aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/acl.c2
-rw-r--r--fs/ext2/ioctl.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c
index 7c420b800c34..e58669e1b87c 100644
--- a/fs/ext2/acl.c
+++ b/fs/ext2/acl.c
@@ -464,7 +464,7 @@ ext2_xattr_set_acl(struct inode *inode, int type, const void *value,
464 464
465 if (!test_opt(inode->i_sb, POSIX_ACL)) 465 if (!test_opt(inode->i_sb, POSIX_ACL))
466 return -EOPNOTSUPP; 466 return -EOPNOTSUPP;
467 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 467 if (!is_owner_or_cap(inode))
468 return -EPERM; 468 return -EPERM;
469 469
470 if (value) { 470 if (value) {
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c
index e85c48218239..3bcd25422ee4 100644
--- a/fs/ext2/ioctl.c
+++ b/fs/ext2/ioctl.c
@@ -36,7 +36,7 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
36 if (IS_RDONLY(inode)) 36 if (IS_RDONLY(inode))
37 return -EROFS; 37 return -EROFS;
38 38
39 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 39 if (!is_owner_or_cap(inode))
40 return -EACCES; 40 return -EACCES;
41 41
42 if (get_user(flags, (int __user *) arg)) 42 if (get_user(flags, (int __user *) arg))
@@ -74,7 +74,7 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
74 case EXT2_IOC_GETVERSION: 74 case EXT2_IOC_GETVERSION:
75 return put_user(inode->i_generation, (int __user *) arg); 75 return put_user(inode->i_generation, (int __user *) arg);
76 case EXT2_IOC_SETVERSION: 76 case EXT2_IOC_SETVERSION:
77 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 77 if (!is_owner_or_cap(inode))
78 return -EPERM; 78 return -EPERM;
79 if (IS_RDONLY(inode)) 79 if (IS_RDONLY(inode))
80 return -EROFS; 80 return -EROFS;