diff options
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/ioctl.c | 1 | ||||
-rw-r--r-- | fs/jfs/jfs_dtree.c | 6 | ||||
-rw-r--r-- | fs/jfs/jfs_filsys.h | 42 | ||||
-rw-r--r-- | fs/jfs/jfs_imap.c | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_logmgr.c | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_metapage.c | 19 | ||||
-rw-r--r-- | fs/jfs/jfs_txnmgr.c | 2 | ||||
-rw-r--r-- | fs/jfs/super.c | 6 |
8 files changed, 34 insertions, 46 deletions
diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c index 37db52488262..ed814b1ff4d9 100644 --- a/fs/jfs/ioctl.c +++ b/fs/jfs/ioctl.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/ctype.h> | 9 | #include <linux/ctype.h> |
10 | #include <linux/capability.h> | 10 | #include <linux/capability.h> |
11 | #include <linux/time.h> | 11 | #include <linux/time.h> |
12 | #include <linux/sched.h> | ||
12 | #include <asm/current.h> | 13 | #include <asm/current.h> |
13 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
14 | 15 | ||
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index ecb2216d881c..6d62f3222892 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c | |||
@@ -3009,7 +3009,7 @@ static inline struct jfs_dirent *next_jfs_dirent(struct jfs_dirent *dirent) | |||
3009 | */ | 3009 | */ |
3010 | int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | 3010 | int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) |
3011 | { | 3011 | { |
3012 | struct inode *ip = filp->f_dentry->d_inode; | 3012 | struct inode *ip = filp->f_path.dentry->d_inode; |
3013 | struct nls_table *codepage = JFS_SBI(ip->i_sb)->nls_tab; | 3013 | struct nls_table *codepage = JFS_SBI(ip->i_sb)->nls_tab; |
3014 | int rc = 0; | 3014 | int rc = 0; |
3015 | loff_t dtpos; /* legacy OS/2 style position */ | 3015 | loff_t dtpos; /* legacy OS/2 style position */ |
@@ -3777,12 +3777,12 @@ static int ciGetLeafPrefixKey(dtpage_t * lp, int li, dtpage_t * rp, | |||
3777 | struct component_name lkey; | 3777 | struct component_name lkey; |
3778 | struct component_name rkey; | 3778 | struct component_name rkey; |
3779 | 3779 | ||
3780 | lkey.name = (wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), | 3780 | lkey.name = kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), |
3781 | GFP_KERNEL); | 3781 | GFP_KERNEL); |
3782 | if (lkey.name == NULL) | 3782 | if (lkey.name == NULL) |
3783 | return -ENOMEM; | 3783 | return -ENOMEM; |
3784 | 3784 | ||
3785 | rkey.name = (wchar_t *) kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), | 3785 | rkey.name = kmalloc((JFS_NAME_MAX + 1) * sizeof(wchar_t), |
3786 | GFP_KERNEL); | 3786 | GFP_KERNEL); |
3787 | if (rkey.name == NULL) { | 3787 | if (rkey.name == NULL) { |
3788 | kfree(lkey.name); | 3788 | kfree(lkey.name); |
diff --git a/fs/jfs/jfs_filsys.h b/fs/jfs/jfs_filsys.h index 9901928668cf..38f70ac03bec 100644 --- a/fs/jfs/jfs_filsys.h +++ b/fs/jfs/jfs_filsys.h | |||
@@ -29,31 +29,21 @@ | |||
29 | /* | 29 | /* |
30 | * file system option (superblock flag) | 30 | * file system option (superblock flag) |
31 | */ | 31 | */ |
32 | /* mount time flag to disable journaling to disk */ | 32 | |
33 | #define JFS_NOINTEGRITY 0x00000010 | 33 | /* directory option */ |
34 | #define JFS_UNICODE 0x00000001 /* unicode name */ | ||
34 | 35 | ||
35 | /* mount time flags for error handling */ | 36 | /* mount time flags for error handling */ |
36 | #define JFS_ERR_REMOUNT_RO 0x00000002 /* remount read-only */ | 37 | #define JFS_ERR_REMOUNT_RO 0x00000002 /* remount read-only */ |
37 | #define JFS_ERR_CONTINUE 0x00000004 /* continue */ | 38 | #define JFS_ERR_CONTINUE 0x00000004 /* continue */ |
38 | #define JFS_ERR_PANIC 0x00000008 /* panic */ | 39 | #define JFS_ERR_PANIC 0x00000008 /* panic */ |
39 | 40 | ||
41 | /* Quota support */ | ||
40 | #define JFS_USRQUOTA 0x00000010 | 42 | #define JFS_USRQUOTA 0x00000010 |
41 | #define JFS_GRPQUOTA 0x00000020 | 43 | #define JFS_GRPQUOTA 0x00000020 |
42 | 44 | ||
43 | /* platform option (conditional compilation) */ | 45 | /* mount time flag to disable journaling to disk */ |
44 | #define JFS_AIX 0x80000000 /* AIX support */ | 46 | #define JFS_NOINTEGRITY 0x00000040 |
45 | /* POSIX name/directory support */ | ||
46 | |||
47 | #define JFS_OS2 0x40000000 /* OS/2 support */ | ||
48 | /* case-insensitive name/directory support */ | ||
49 | |||
50 | #define JFS_DFS 0x20000000 /* DCE DFS LFS support */ | ||
51 | |||
52 | #define JFS_LINUX 0x10000000 /* Linux support */ | ||
53 | /* case-sensitive name/directory support */ | ||
54 | |||
55 | /* directory option */ | ||
56 | #define JFS_UNICODE 0x00000001 /* unicode name */ | ||
57 | 47 | ||
58 | /* commit option */ | 48 | /* commit option */ |
59 | #define JFS_COMMIT 0x00000f00 /* commit option mask */ | 49 | #define JFS_COMMIT 0x00000f00 /* commit option mask */ |
@@ -61,6 +51,7 @@ | |||
61 | #define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */ | 51 | #define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */ |
62 | #define JFS_TMPFS 0x00000400 /* temporary file system - | 52 | #define JFS_TMPFS 0x00000400 /* temporary file system - |
63 | * do not log/commit: | 53 | * do not log/commit: |
54 | * Never implemented | ||
64 | */ | 55 | */ |
65 | 56 | ||
66 | /* log logical volume option */ | 57 | /* log logical volume option */ |
@@ -74,16 +65,25 @@ | |||
74 | #define JFS_SPARSE 0x00020000 /* sparse regular file */ | 65 | #define JFS_SPARSE 0x00020000 /* sparse regular file */ |
75 | 66 | ||
76 | /* DASD Limits F226941 */ | 67 | /* DASD Limits F226941 */ |
77 | #define JFS_DASD_ENABLED 0x00040000 /* DASD limits enabled */ | 68 | #define JFS_DASD_ENABLED 0x00040000 /* DASD limits enabled */ |
78 | #define JFS_DASD_PRIME 0x00080000 /* Prime DASD usage on boot */ | 69 | #define JFS_DASD_PRIME 0x00080000 /* Prime DASD usage on boot */ |
79 | 70 | ||
80 | /* big endian flag */ | 71 | /* big endian flag */ |
81 | #define JFS_SWAP_BYTES 0x00100000 /* running on big endian computer */ | 72 | #define JFS_SWAP_BYTES 0x00100000 /* running on big endian computer */ |
82 | 73 | ||
83 | /* Directory index */ | 74 | /* Directory index */ |
84 | #define JFS_DIR_INDEX 0x00200000 /* Persistant index for */ | 75 | #define JFS_DIR_INDEX 0x00200000 /* Persistent index for */ |
85 | /* directory entries */ | ||
86 | 76 | ||
77 | /* platform options */ | ||
78 | #define JFS_LINUX 0x10000000 /* Linux support */ | ||
79 | #define JFS_DFS 0x20000000 /* DCE DFS LFS support */ | ||
80 | /* Never implemented */ | ||
81 | |||
82 | #define JFS_OS2 0x40000000 /* OS/2 support */ | ||
83 | /* case-insensitive name/directory support */ | ||
84 | |||
85 | #define JFS_AIX 0x80000000 /* AIX support */ | ||
86 | /* POSIX name/directory support - Never implemented*/ | ||
87 | 87 | ||
88 | /* | 88 | /* |
89 | * buffer cache configuration | 89 | * buffer cache configuration |
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index ee9b473b7b80..53f63b47a6d3 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
@@ -120,7 +120,7 @@ int diMount(struct inode *ipimap) | |||
120 | * allocate/initialize the in-memory inode map control structure | 120 | * allocate/initialize the in-memory inode map control structure |
121 | */ | 121 | */ |
122 | /* allocate the in-memory inode map control structure. */ | 122 | /* allocate the in-memory inode map control structure. */ |
123 | imap = (struct inomap *) kmalloc(sizeof(struct inomap), GFP_KERNEL); | 123 | imap = kmalloc(sizeof(struct inomap), GFP_KERNEL); |
124 | if (imap == NULL) { | 124 | if (imap == NULL) { |
125 | jfs_err("diMount: kmalloc returned NULL!"); | 125 | jfs_err("diMount: kmalloc returned NULL!"); |
126 | return -ENOMEM; | 126 | return -ENOMEM; |
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index b89c9aba0466..5065baa530b6 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c | |||
@@ -67,7 +67,7 @@ | |||
67 | #include <linux/kthread.h> | 67 | #include <linux/kthread.h> |
68 | #include <linux/buffer_head.h> /* for sync_blockdev() */ | 68 | #include <linux/buffer_head.h> /* for sync_blockdev() */ |
69 | #include <linux/bio.h> | 69 | #include <linux/bio.h> |
70 | #include <linux/suspend.h> | 70 | #include <linux/freezer.h> |
71 | #include <linux/delay.h> | 71 | #include <linux/delay.h> |
72 | #include <linux/mutex.h> | 72 | #include <linux/mutex.h> |
73 | #include "jfs_incore.h" | 73 | #include "jfs_incore.h" |
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 0cccd1c39d75..ceaf03b94935 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -74,7 +74,7 @@ static inline void lock_metapage(struct metapage *mp) | |||
74 | } | 74 | } |
75 | 75 | ||
76 | #define METAPOOL_MIN_PAGES 32 | 76 | #define METAPOOL_MIN_PAGES 32 |
77 | static kmem_cache_t *metapage_cache; | 77 | static struct kmem_cache *metapage_cache; |
78 | static mempool_t *metapage_mempool; | 78 | static mempool_t *metapage_mempool; |
79 | 79 | ||
80 | #define MPS_PER_PAGE (PAGE_CACHE_SIZE >> L2PSIZE) | 80 | #define MPS_PER_PAGE (PAGE_CACHE_SIZE >> L2PSIZE) |
@@ -180,7 +180,7 @@ static inline void remove_metapage(struct page *page, struct metapage *mp) | |||
180 | 180 | ||
181 | #endif | 181 | #endif |
182 | 182 | ||
183 | static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) | 183 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) |
184 | { | 184 | { |
185 | struct metapage *mp = (struct metapage *)foo; | 185 | struct metapage *mp = (struct metapage *)foo; |
186 | 186 | ||
@@ -764,22 +764,9 @@ void release_metapage(struct metapage * mp) | |||
764 | } else if (mp->lsn) /* discard_metapage doesn't remove it */ | 764 | } else if (mp->lsn) /* discard_metapage doesn't remove it */ |
765 | remove_from_logsync(mp); | 765 | remove_from_logsync(mp); |
766 | 766 | ||
767 | #if MPS_PER_PAGE == 1 | ||
768 | /* | ||
769 | * If we know this is the only thing in the page, we can throw | ||
770 | * the page out of the page cache. If pages are larger, we | ||
771 | * don't want to do this. | ||
772 | */ | ||
773 | |||
774 | /* Retest mp->count since we may have released page lock */ | ||
775 | if (test_bit(META_discard, &mp->flag) && !mp->count) { | ||
776 | clear_page_dirty(page); | ||
777 | ClearPageUptodate(page); | ||
778 | } | ||
779 | #else | ||
780 | /* Try to keep metapages from using up too much memory */ | 767 | /* Try to keep metapages from using up too much memory */ |
781 | drop_metapage(page, mp); | 768 | drop_metapage(page, mp); |
782 | #endif | 769 | |
783 | unlock_page(page); | 770 | unlock_page(page); |
784 | page_cache_release(page); | 771 | page_cache_release(page); |
785 | } | 772 | } |
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index 81f6f04af192..d558e51b0df8 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <linux/vmalloc.h> | 46 | #include <linux/vmalloc.h> |
47 | #include <linux/smp_lock.h> | 47 | #include <linux/smp_lock.h> |
48 | #include <linux/completion.h> | 48 | #include <linux/completion.h> |
49 | #include <linux/suspend.h> | 49 | #include <linux/freezer.h> |
50 | #include <linux/module.h> | 50 | #include <linux/module.h> |
51 | #include <linux/moduleparam.h> | 51 | #include <linux/moduleparam.h> |
52 | #include <linux/kthread.h> | 52 | #include <linux/kthread.h> |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 9c1c6e0e633d..846ac8f34513 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -44,7 +44,7 @@ MODULE_DESCRIPTION("The Journaled Filesystem (JFS)"); | |||
44 | MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM"); | 44 | MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM"); |
45 | MODULE_LICENSE("GPL"); | 45 | MODULE_LICENSE("GPL"); |
46 | 46 | ||
47 | static kmem_cache_t * jfs_inode_cachep; | 47 | static struct kmem_cache * jfs_inode_cachep; |
48 | 48 | ||
49 | static struct super_operations jfs_super_operations; | 49 | static struct super_operations jfs_super_operations; |
50 | static struct export_operations jfs_export_operations; | 50 | static struct export_operations jfs_export_operations; |
@@ -93,7 +93,7 @@ void jfs_error(struct super_block *sb, const char * function, ...) | |||
93 | va_list args; | 93 | va_list args; |
94 | 94 | ||
95 | va_start(args, function); | 95 | va_start(args, function); |
96 | vsprintf(error_buf, function, args); | 96 | vsnprintf(error_buf, sizeof(error_buf), function, args); |
97 | va_end(args); | 97 | va_end(args); |
98 | 98 | ||
99 | printk(KERN_ERR "ERROR: (device %s): %s\n", sb->s_id, error_buf); | 99 | printk(KERN_ERR "ERROR: (device %s): %s\n", sb->s_id, error_buf); |
@@ -748,7 +748,7 @@ static struct file_system_type jfs_fs_type = { | |||
748 | .fs_flags = FS_REQUIRES_DEV, | 748 | .fs_flags = FS_REQUIRES_DEV, |
749 | }; | 749 | }; |
750 | 750 | ||
751 | static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) | 751 | static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags) |
752 | { | 752 | { |
753 | struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; | 753 | struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; |
754 | 754 | ||