public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: r-yamauchi@vf.jp.nec.com
To: xfs@oss.sgi.com
Subject: [PATCH] xfs: fix xfs_quota remove error
Date: Thu, 22 Oct 2009 16:06:27 +0900	[thread overview]
Message-ID: <20091022160627r-yamauchi@mail.jp.nec.com> (raw)

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

             reply	other threads:[~2009-10-22  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22  7:06 r-yamauchi [this message]
2009-10-22  8:58 ` [PATCH] xfs: fix xfs_quota remove error Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091022160627r-yamauchi@mail.jp.nec.com \
    --to=r-yamauchi@vf.jp.nec.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox