]> git.hungrycats.org Git - linux/commitdiff
Revert "xfs: add capability check to free eofblocks ioctl"
authorJiri Slaby <jslaby@suse.cz>
Tue, 3 May 2016 14:33:43 +0000 (16:33 +0200)
committerJiri Slaby <jslaby@suse.cz>
Tue, 3 May 2016 15:41:30 +0000 (17:41 +0200)
This reverts commit eaeeaec383f3228446715e660851f73423501eba, upstream
commit 8c567a7fab6e086a0284eee2db82348521e7120c.

It was (mis)applied twice to stable-3.12.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Brian Foster <bfoster@redhat.com>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Dwight Engen <dwight.engen@oracle.com>
Cc: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_ioctl.c

index 52b5375faedc0db0fc73a8f6e176bd39337b172e..93a5e91796e9baf8f662af31bd8a3f68f89c88ea 100644 (file)
@@ -1712,12 +1712,6 @@ xfs_file_ioctl(
                struct xfs_fs_eofblocks eofb;
                struct xfs_eofblocks keofb;
 
-               if (!capable(CAP_SYS_ADMIN))
-                       return -EPERM;
-
-               if (mp->m_flags & XFS_MOUNT_RDONLY)
-                       return -XFS_ERROR(EROFS);
-
                if (!capable(CAP_SYS_ADMIN))
                        return -EPERM;