Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
JFS: Remove redundant xattr permission checking

+5 -4
+5 -4
fs/jfs/xattr.c
··· 756 return -EOPNOTSUPP; 757 } 758 759 static int can_set_xattr(struct inode *inode, const char *name, 760 const void *value, size_t value_len) 761 { ··· 775 strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) && 776 strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)) 777 return -EOPNOTSUPP; 778 - 779 - if (!S_ISREG(inode->i_mode) && 780 - (!S_ISDIR(inode->i_mode) || inode->i_mode &S_ISVTX)) 781 - return -EPERM; 782 783 return 0; 784 }
··· 756 return -EOPNOTSUPP; 757 } 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 + */ 764 static int can_set_xattr(struct inode *inode, const char *name, 765 const void *value, size_t value_len) 766 { ··· 770 strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) && 771 strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)) 772 return -EOPNOTSUPP; 773 774 return 0; 775 }