All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Chengguang Xu <cgxu519@gmx.com>
Cc: jack@suse.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] quota: code cleanup for __dquot_alloc_space()
Date: Wed, 20 Mar 2019 12:48:49 +0100	[thread overview]
Message-ID: <20190320114849.GC9485@quack2.suse.cz> (raw)
In-Reply-To: <20190320050400.20616-1-cgxu519@gmx.com>

On Wed 20-03-19 13:03:59, Chengguang Xu wrote:
> Replace (flags & DQUOT_SPACE_RESERVE) with
> variable reserve.
> 
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>

Thanks. I've added the patch to my tree.

								Honza

> ---
>  fs/quota/dquot.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index fc20e06c56ba..00de508f9d2e 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -1663,7 +1663,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
>  	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
>  		if (!dquots[cnt])
>  			continue;
> -		if (flags & DQUOT_SPACE_RESERVE) {
> +		if (reserve) {
>  			ret = dquot_add_space(dquots[cnt], 0, number, flags,
>  					      &warn[cnt]);
>  		} else {
> @@ -1676,7 +1676,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
>  				if (!dquots[cnt])
>  					continue;
>  				spin_lock(&dquots[cnt]->dq_dqb_lock);
> -				if (flags & DQUOT_SPACE_RESERVE) {
> +				if (reserve) {
>  					dquots[cnt]->dq_dqb.dqb_rsvspace -=
>  									number;
>  				} else {
> --
> 2.20.1
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2019-03-20 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  5:03 [PATCH] quota: code cleanup for __dquot_alloc_space() Chengguang Xu
2019-03-20 11:48 ` Jan Kara [this message]

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=20190320114849.GC9485@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=cgxu519@gmx.com \
    --cc=jack@suse.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.