aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/file.c2
-rw-r--r--fs/jfs/ioctl.c1
-rw-r--r--fs/jfs/jfs_dtree.c2
-rw-r--r--fs/jfs/jfs_filsys.h42
-rw-r--r--fs/jfs/jfs_imap.c4
-rw-r--r--fs/jfs/jfs_logmgr.c2
-rw-r--r--fs/jfs/jfs_metapage.c4
-rw-r--r--fs/jfs/jfs_txnmgr.c2
-rw-r--r--fs/jfs/super.c6
-rw-r--r--fs/jfs/xattr.c9
10 files changed, 39 insertions, 35 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index 34181b8f5a0a..aa9132d04920 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
@@ -109,6 +109,8 @@ const struct file_operations jfs_file_operations = {
109 .aio_write = generic_file_aio_write, 109 .aio_write = generic_file_aio_write,
110 .mmap = generic_file_mmap, 110 .mmap = generic_file_mmap,
111 .sendfile = generic_file_sendfile, 111 .sendfile = generic_file_sendfile,
112 .splice_read = generic_file_splice_read,
113 .splice_write = generic_file_splice_write,
112 .fsync = jfs_fsync, 114 .fsync = jfs_fsync,
113 .release = jfs_release, 115 .release = jfs_release,
114 .ioctl = jfs_ioctl, 116 .ioctl = jfs_ioctl,
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..47bc0b5d1324 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 */
3010int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) 3010int 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 */
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 489a3d63002d..ee9b473b7b80 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -318,7 +318,7 @@ int diRead(struct inode *ip)
318 struct inomap *imap; 318 struct inomap *imap;
319 int block_offset; 319 int block_offset;
320 int inodes_left; 320 int inodes_left;
321 uint pageno; 321 unsigned long pageno;
322 int rel_inode; 322 int rel_inode;
323 323
324 jfs_info("diRead: ino = %ld", ip->i_ino); 324 jfs_info("diRead: ino = %ld", ip->i_ino);
@@ -606,7 +606,7 @@ int diWrite(tid_t tid, struct inode *ip)
606 int block_offset; 606 int block_offset;
607 int inodes_left; 607 int inodes_left;
608 struct metapage *mp; 608 struct metapage *mp;
609 uint pageno; 609 unsigned long pageno;
610 int rel_inode; 610 int rel_inode;
611 int dioffset; 611 int dioffset;
612 struct inode *ipimap; 612 struct inode *ipimap;
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..b1a1c7296014 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
77static kmem_cache_t *metapage_cache; 77static struct kmem_cache *metapage_cache;
78static mempool_t *metapage_mempool; 78static 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
183static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) 183static 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
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)");
44MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM"); 44MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM");
45MODULE_LICENSE("GPL"); 45MODULE_LICENSE("GPL");
46 46
47static kmem_cache_t * jfs_inode_cachep; 47static struct kmem_cache * jfs_inode_cachep;
48 48
49static struct super_operations jfs_super_operations; 49static struct super_operations jfs_super_operations;
50static struct export_operations jfs_export_operations; 50static 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
751static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) 751static 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
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c
index 4c7985ebca92..b753ba216450 100644
--- a/fs/jfs/xattr.c
+++ b/fs/jfs/xattr.c
@@ -756,6 +756,11 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
756 return -EOPNOTSUPP; 756 return -EOPNOTSUPP;
757} 757}
758 758
759/*
760 * Most of the permission checking is done by xattr_permission in the vfs.
761 * The local file system is responsible for handling the system.* namespace.
762 * We also need to verify that this is a namespace that we recognize.
763 */
759static int can_set_xattr(struct inode *inode, const char *name, 764static int can_set_xattr(struct inode *inode, const char *name,
760 const void *value, size_t value_len) 765 const void *value, size_t value_len)
761{ 766{
@@ -771,10 +776,6 @@ static int can_set_xattr(struct inode *inode, const char *name,
771 strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)) 776 strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN))
772 return -EOPNOTSUPP; 777 return -EOPNOTSUPP;
773 778
774 if (!S_ISREG(inode->i_mode) &&
775 (!S_ISDIR(inode->i_mode) || inode->i_mode &S_ISVTX))
776 return -EPERM;
777
778 return 0; 779 return 0;
779} 780}
780 781