linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: jack@suse.cz
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 4/3] quota: remove sb_has_quota_active in get/set_info
Date: Fri, 7 May 2010 12:35:40 -0400	[thread overview]
Message-ID: <20100507163540.GA16331@infradead.org> (raw)
In-Reply-To: <20100505103937.040319545@bombadil.infradead.org>

The methods already do these checks, so remove them in the quotactl
implementation to allow non-VFS quota implementations to also support
these calls.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/quota/quota.c
===================================================================
--- linux-2.6.orig/fs/quota/quota.c	2010-05-07 18:28:26.438025430 +0200
+++ linux-2.6/fs/quota/quota.c	2010-05-07 18:30:30.919283361 +0200
@@ -113,8 +113,6 @@ static int quota_getinfo(struct super_bl
 	struct if_dqinfo info;
 	int ret;
 
-	if (!sb_has_quota_active(sb, type))
-		return -ESRCH;
 	if (!sb->s_qcop->get_info)
 		return -ENOSYS;
 	ret = sb->s_qcop->get_info(sb, type, &info);
@@ -129,8 +127,6 @@ static int quota_setinfo(struct super_bl
 
 	if (copy_from_user(&info, addr, sizeof(info)))
 		return -EFAULT;
-	if (!sb_has_quota_active(sb, type))
-		return -ESRCH;
 	if (!sb->s_qcop->set_info)
 		return -ENOSYS;
 	return sb->s_qcop->set_info(sb, type, &info);

  parent reply	other threads:[~2010-05-07 16:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 10:39 [PATCH 0/3] start the quota unification Christoph Hellwig
2010-05-05 10:39 ` [PATCH 1/3] cifs: drop quota operation stubs Christoph Hellwig
2010-05-05 15:34   ` Jan Kara
2010-05-05 18:57     ` Steve French
2010-05-06 11:47   ` Jeff Layton
2010-05-05 10:39 ` [PATCH 2/3] quota: unify ->get_dqblk Christoph Hellwig
2010-05-05 13:52   ` Steven Whitehouse
2010-05-05 16:18     ` Christoph Hellwig
2010-05-05 16:00   ` Jan Kara
2010-05-05 16:20     ` Christoph Hellwig
2010-05-06 21:04   ` [PATCH 2/3 v2] " Christoph Hellwig
2010-05-05 10:39 ` [PATCH 3/3] quota: unify ->set_dqblk Christoph Hellwig
2010-05-05 16:09   ` Jan Kara
2010-05-05 16:21     ` Christoph Hellwig
2010-05-06 21:05   ` [PATCH 3/3 v2] " Christoph Hellwig
2010-05-07 16:35 ` Christoph Hellwig [this message]
2010-05-11  8:33   ` [PATCH 4/3] quota: remove sb_has_quota_active in get/set_info Jan Kara

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=20100507163540.GA16331@infradead.org \
    --to=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).