lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190320114849.GC9485@quack2.suse.cz>
Date:   Wed, 20 Mar 2019 12:48:49 +0100
From:   Jan Kara <jack@...e.cz>
To:     Chengguang Xu <cgxu519@....com>
Cc:     jack@...e.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] quota: code cleanup for __dquot_alloc_space()

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@....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@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ