public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix xfs_quota remove error
@ 2009-10-22  7:06 r-yamauchi
  2009-10-22  8:58 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: r-yamauchi @ 2009-10-22  7:06 UTC (permalink / raw)
  To: xfs

Hi,

The xfs_quota returns ENOSYS when remove command is executed.
My kernel version is 2.6.31 and xfsprogs version is 3.0.3.
You can reproduce this issue 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_xstate() checks whether quota is running, 
so it leads to ENOSYS.

To solve this problem, add conditional statement 
that op is not X_QUOTARM with running check.

Signed-off-by: Ryota Yamauchi <r-yamauchi@vf.jp.nec.com>
Signed-off-by: Utako Kusaka <u-kusaka@wm.jp.nec.com>

----
xfs_quotaops.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff -Nrup a/fs/xfs/linux-2.6/xfs_quotaops.c b/fs/xfs/linux-2.6/xfs_quotaops.c
--- a/fs/xfs/linux-2.6/xfs_quotaops.c	2009-10-21 14:15:12.000000000 +0900
+++ b/fs/xfs/linux-2.6/xfs_quotaops.c	2009-10-21 14:16:04.000000000 +0900
@@ -80,7 +80,7 @@ xfs_fs_set_xstate(
 
 	if (sb->s_flags & MS_RDONLY)
 		return -EROFS;
-	if (!XFS_IS_QUOTA_RUNNING(mp))
+	if (!XFS_IS_QUOTA_RUNNING(mp) && op != Q_XQUOTARM)
 		return -ENOSYS;
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;

Best regards,
Ryota Yamauchi

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-22  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22  7:06 [PATCH] xfs: fix xfs_quota remove error r-yamauchi
2009-10-22  8:58 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox