diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2010-02-05 17:59:53 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-02-08 18:41:48 -0500 |
commit | d5db0f97fbbeff11c88dec1aaf1536a975afbaeb (patch) | |
tree | 3e81db2cb8c5004f3c30ccaa35e54fbf1549897f /fs/xfs/linux-2.6/xfs_ioctl.c | |
parent | 388f1f0c346b533b06d8bc792f7204ebc3e4b7da (diff) |
xfs: more reserved blocks fixups
This mangles the reserved blocks counts a little more.
1) add a helper function for the default reserved count
2) add helper functions to save/restore counts on ro/rw
3) save/restore reserved blocks on freeze/thaw
4) disallow changing reserved count while readonly
V2: changed field name to match Dave's changes
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 3906e85abfdc..4ea1ee18aded 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -1431,6 +1431,9 @@ xfs_file_ioctl( | |||
1431 | if (!capable(CAP_SYS_ADMIN)) | 1431 | if (!capable(CAP_SYS_ADMIN)) |
1432 | return -EPERM; | 1432 | return -EPERM; |
1433 | 1433 | ||
1434 | if (mp->m_flags & XFS_MOUNT_RDONLY) | ||
1435 | return -XFS_ERROR(EROFS); | ||
1436 | |||
1434 | if (copy_from_user(&inout, arg, sizeof(inout))) | 1437 | if (copy_from_user(&inout, arg, sizeof(inout))) |
1435 | return -XFS_ERROR(EFAULT); | 1438 | return -XFS_ERROR(EFAULT); |
1436 | 1439 | ||