[PATCH] Don't return -EPERM for system xattrs. (2 of 6)

[email protected] Thu, 20 May 2004 16:50:26 -0500
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/05/19 10:20:44-05:00 [email protected] 
#   JFS: Don't return -EPERM for system xattrs.
#   
#   Also, we don't need to call jfs_permission directly anymore, just
#   permission.
#   
#   Thanks Andreas Gruenbacher
# 
diff -Nru a/fs/jfs/xattr.c b/fs/jfs/xattr.c
--- a/fs/jfs/xattr.c	2004-05-20 16:47:24 -05:00
+++ b/fs/jfs/xattr.c	2004-05-20 16:47:24 -05:00
@@ -738,11 +738,7 @@
 	    (!S_ISDIR(inode->i_mode) || inode->i_mode &S_ISVTX))
 		return -EPERM;
 
-#ifdef CONFIG_JFS_POSIX_ACL
-	return jfs_permission(inode, MAY_WRITE, NULL);
-#else
 	return permission(inode, MAY_WRITE, NULL);
-#endif
 }
 
 int __jfs_setxattr(struct inode *inode, const char *name, const void *value,
@@ -901,13 +897,9 @@
 
 static int can_get_xattr(struct inode *inode, const char *name)
 {
-#ifdef CONFIG_JFS_POSIX_ACL
 	if(strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN) == 0)
 		return 0;
-	return jfs_permission(inode, MAY_READ, NULL);
-#else
 	return permission(inode, MAY_READ, NULL);
-#endif
 }
 
 ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data,