From: Jan Kara <jack@suse.cz>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
jack@suse.cz
Subject: Re: [PATCH]: Remove redundant underlying file system checking that the quota files resides from dquot_quota_on()
Date: Mon, 23 Apr 2012 09:44:12 +0200 [thread overview]
Message-ID: <20120423074412.GA6512@quack.suse.cz> (raw)
In-Reply-To: <4F93A22D.300@oracle.com>
Hi,
On Sun 22-04-12 14:16:13, Jeff Liu wrote:
> When executing quotaon(8), all the file systems(ext3/ext4/reiserfs)
> binded to the VFS quota framework have already ensured that the quota
> files are resides on the same file system with the specified super block
> before invoking dquot_quota_on(), looks like we can be safely remove it
> from there IMHO.
Not really, ext2 doesn't perform the check. Also ext3 or reiserfs when
not using journalled quota don't do the check. So the test has to stay
there. Is there any special reason why you would like to have it removed?
Honza
> ---
> fs/quota/dquot.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index 4674197..cb917a2 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -2199,13 +2199,10 @@ int dquot_quota_on(struct super_block *sb, int type, int format_id,
> int error = security_quota_on(path->dentry);
> if (error)
> return error;
> - /* Quota file not on the same filesystem? */
> - if (path->dentry->d_sb != sb)
> - error = -EXDEV;
> - else
> - error = vfs_load_quota_inode(path->dentry->d_inode, type,
> - format_id, DQUOT_USAGE_ENABLED |
> - DQUOT_LIMITS_ENABLED);
> +
> + error = vfs_load_quota_inode(path->dentry->d_inode, type,
> + format_id, DQUOT_USAGE_ENABLED |
> + DQUOT_LIMITS_ENABLED);
> return error;
> }
> EXPORT_SYMBOL(dquot_quota_on);
> --
> 1.7.9
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2012-04-23 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-22 6:16 [PATCH]: Remove redundant underlying file system checking that the quota files resides from dquot_quota_on() Jeff Liu
2012-04-23 7:44 ` Jan Kara [this message]
2012-04-23 0:02 ` Jeff Liu
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=20120423074412.GA6512@quack.suse.cz \
--to=jack@suse.cz \
--cc=jeff.liu@oracle.com \
--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).