diff options
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
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)) |