aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/acl.c2
-rw-r--r--fs/ext4/ioctl.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
index 9e882546d91a..a8bae8cd1d5d 100644
--- a/fs/ext4/acl.c
+++ b/fs/ext4/acl.c
@@ -489,7 +489,7 @@ ext4_xattr_set_acl(struct inode *inode, int type, const void *value,
489 489
490 if (!test_opt(inode->i_sb, POSIX_ACL)) 490 if (!test_opt(inode->i_sb, POSIX_ACL))
491 return -EOPNOTSUPP; 491 return -EOPNOTSUPP;
492 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 492 if (!is_owner_or_cap(inode))
493 return -EPERM; 493 return -EPERM;
494 494
495 if (value) { 495 if (value) {
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 500567dd53b6..7b4aa4543c83 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -40,7 +40,7 @@ int ext4_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
40 if (IS_RDONLY(inode)) 40 if (IS_RDONLY(inode))
41 return -EROFS; 41 return -EROFS;
42 42
43 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 43 if (!is_owner_or_cap(inode))
44 return -EACCES; 44 return -EACCES;
45 45
46 if (get_user(flags, (int __user *) arg)) 46 if (get_user(flags, (int __user *) arg))
@@ -121,7 +121,7 @@ flags_err:
121 __u32 generation; 121 __u32 generation;
122 int err; 122 int err;
123 123
124 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 124 if (!is_owner_or_cap(inode))
125 return -EPERM; 125 return -EPERM;
126 if (IS_RDONLY(inode)) 126 if (IS_RDONLY(inode))
127 return -EROFS; 127 return -EROFS;
@@ -180,7 +180,7 @@ flags_err:
180 if (IS_RDONLY(inode)) 180 if (IS_RDONLY(inode))
181 return -EROFS; 181 return -EROFS;
182 182
183 if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) 183 if (!is_owner_or_cap(inode))
184 return -EACCES; 184 return -EACCES;
185 185
186 if (get_user(rsv_window_size, (int __user *)arg)) 186 if (get_user(rsv_window_size, (int __user *)arg))