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/jfs_imap.c4
-rw-r--r--fs/jfs/xattr.c9
3 files changed, 9 insertions, 6 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/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/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