Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp597297img; Wed, 20 Mar 2019 07:07:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzuV33HrnxiEFNOtSVWXJC/FC+ik7pEz1rzI/J2iwLbQJISZyo4cfb/+xnc64YVw/WHIF1 X-Received: by 2002:a63:1749:: with SMTP id 9mr7338828pgx.94.1553090870792; Wed, 20 Mar 2019 07:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553090870; cv=none; d=google.com; s=arc-20160816; b=MejvoGiO84Ck6zId7BB4/rOgtzRF8u9WZW1sajzXu5bKLJ0NSHDko0DHGSvXr458x4 SZ9bjMPI79BsS4VSFp7vFSj/dUecW0kxT672ZCiSywNY8D2UUPoQWrgo1LoxgwLwPuFQ Hccm2J+n2Cha6+Xdimdp86xhfL4VUwi+qHO/GWrgWdh4PQosxlWdgfCEtTTvEXhgth8Q Dm3KXJu2Krq/5hrjYnld8n9UJocDSvFYlN42vlhmOlDuQj1fLRpmOgHnRreDrC4SVcsj IT3u9G78zP1yQT4M6DMYe5uho/t7anO/0zgF7DwdsP0NCBd246LCFwZhS7mcWBmznQI1 Av3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=x8BNCq50mVh9VfGPnIY5NiohDc0zKFqkEHPBK1mbEEo=; b=IdkNycZ16shyd5J4M61eXrk/5kYtCPpq2Ty7ZYUppnmNe708LHBefU4W60mVS034Fq fz8I/C13mU68j9qLnmSbofcb+0UYrDUgQETC4F2oKoLXA4yaNjL/dv8ICAuOMBbpLzxR 3bl7f8kl5X3MtAcOxxw4kb2aS6K+gQ/+cx3ix/ufD7EZ98FnSrNpephwWMevrCCnfVWE Ggqun/h+aQGLaiEkp6N/rk8MuyezzRSzLu++DgE8LJuvewzWfRlPpqzohjWgMdQaHqz9 LqG8LDjtlJUI8hxpCjmiUa438JNCMiY0EWGUCK8a+C4mC2XFZ/E3fXn5XJinzLNd/d3r JDQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r76si1777081pfc.128.2019.03.20.07.07.34; Wed, 20 Mar 2019 07:07:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728090AbfCTLsv (ORCPT + 99 others); Wed, 20 Mar 2019 07:48:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:60056 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727915AbfCTLsv (ORCPT ); Wed, 20 Mar 2019 07:48:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D7584ADED; Wed, 20 Mar 2019 11:48:49 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 9CF4A1E4255; Wed, 20 Mar 2019 12:48:49 +0100 (CET) Date: Wed, 20 Mar 2019 12:48:49 +0100 From: Jan Kara To: Chengguang Xu Cc: jack@suse.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] quota: code cleanup for __dquot_alloc_space() Message-ID: <20190320114849.GC9485@quack2.suse.cz> References: <20190320050400.20616-1-cgxu519@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190320050400.20616-1-cgxu519@gmx.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 20-03-19 13:03:59, Chengguang Xu wrote: > Replace (flags & DQUOT_SPACE_RESERVE) with > variable reserve. > > Signed-off-by: Chengguang Xu 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 SUSE Labs, CR