diff options
author | Ryota Yamauchi <r-yamauchi@vf.jp.nec.com> | 2009-10-30 04:27:44 -0400 |
---|---|---|
committer | hch@lst.de <Christoph Hellwig> | 2009-10-30 04:27:44 -0400 |
commit | c7ff91d722e44c98504e6e2c357b47e1988dfbbd (patch) | |
tree | ce00b608165eab1f4f647eaed997824992b43664 | |
parent | 3b826386d376e5545d2e92b2da5ebd965cafae97 (diff) |
xfs: fix xfs_quota remove error
The xfs_quota returns ENOSYS when remove command is executed.
Reproducable with following steps.
# mount -t xfs -o uquota /dev/sda7 /mnt/mp1
# xfs_quota -x -c off -c remove
XFS_QUOTARM: Function not implemented.
The remove command is allowed during quotaoff, but xfs_fs_set_xstate()
checks whether quota is running, and it leads to ENOSYS.
To solve this problem, add a check for X_QUOTARM.
Signed-off-by: Ryota Yamauchi <r-yamauchi@vf.jp.nec.com>
Signed-off-by: Utako Kusaka <u-kusaka@wm.jp.nec.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | fs/xfs/linux-2.6/xfs_quotaops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_quotaops.c b/fs/xfs/linux-2.6/xfs_quotaops.c index cb6e2cca214f..13cc7b524d6e 100644 --- a/fs/xfs/linux-2.6/xfs_quotaops.c +++ b/fs/xfs/linux-2.6/xfs_quotaops.c | |||
@@ -80,7 +80,7 @@ xfs_fs_set_xstate( | |||
80 | 80 | ||
81 | if (sb->s_flags & MS_RDONLY) | 81 | if (sb->s_flags & MS_RDONLY) |
82 | return -EROFS; | 82 | return -EROFS; |
83 | if (!XFS_IS_QUOTA_RUNNING(mp)) | 83 | if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp)) |
84 | return -ENOSYS; | 84 | return -ENOSYS; |
85 | if (!capable(CAP_SYS_ADMIN)) | 85 | if (!capable(CAP_SYS_ADMIN)) |
86 | return -EPERM; | 86 | return -EPERM; |