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