From: Jan Kara <jack@suse.cz>
To: Chao Yu <chao@kernel.org>
Cc: jack@suse.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, Chao Yu <yuchao0@huawei.com>
Subject: Re: [PATCH v2] quota: propagate error from __dquot_initialize
Date: Mon, 27 Nov 2017 16:56:47 +0100 [thread overview]
Message-ID: <20171127155647.GD5977@quack2.suse.cz> (raw)
In-Reply-To: <20171123152101.5864-1-chao@kernel.org>
On Thu 23-11-17 23:21:01, Chao Yu wrote:
> @@ -2364,10 +2370,11 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
> dqopt->flags |= dquot_state_flag(flags, type);
> spin_unlock(&dq_state_lock);
>
> - add_dquot_ref(sb, type);
> -
> - return 0;
> + error = add_dquot_ref(sb, type);
> + if (error)
> + dquot_disable(sb, type, dqopt->flags);
Why dqopt->flags? If anything these flags are shifted by user/group/project
shift and combined together for all the types. You need to just pass
'flags' here. Other than that the patch looks good.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2017-11-27 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 15:21 Chao Yu
2017-11-27 15:56 ` Jan Kara [this message]
2017-11-28 14:58 ` Chao Yu
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=20171127155647.GD5977@quack2.suse.cz \
--to=jack@suse.cz \
--cc=chao@kernel.org \
--cc=jack@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.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
Powered by JetHome