aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_ioctl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 20b4c7af2928..bdebc21078d7 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1723,6 +1723,12 @@ xfs_file_ioctl(
1723 struct xfs_fs_eofblocks eofb; 1723 struct xfs_fs_eofblocks eofb;
1724 struct xfs_eofblocks keofb; 1724 struct xfs_eofblocks keofb;
1725 1725
1726 if (!capable(CAP_SYS_ADMIN))
1727 return -EPERM;
1728
1729 if (mp->m_flags & XFS_MOUNT_RDONLY)
1730 return -XFS_ERROR(EROFS);
1731
1726 if (copy_from_user(&eofb, arg, sizeof(eofb))) 1732 if (copy_from_user(&eofb, arg, sizeof(eofb)))
1727 return -XFS_ERROR(EFAULT); 1733 return -XFS_ERROR(EFAULT);
1728 1734