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: <9f551194-6e86-41ae-86f7-e9387fbc4871@suse.com>
Date: Wed, 4 Sep 2024 15:33:42 +0800
From: "heming.zhao@...e.com" <heming.zhao@...e.com>
To: Joseph Qi <joseph.qi@...ux.alibaba.com>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: ocfs2-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
 syzbot+f7af59df5d6b25f0febd@...kaller.appspotmail.com
Subject: Re: [PATCH v2 2/2] ocfs2: cleanup return value and mlog in
 ocfs2_global_read_info()



On 9/4/24 15:10, Joseph Qi wrote:
> Return 0 instead of sizeof(ocfs2_global_disk_dqinfo) that .quota_read
> returns in normal case.
> Also cleanup mlog to make code more readable.
> 
> Signed-off-by: Joseph Qi <joseph.qi@...ux.alibaba.com>

Looks good to me.
Reviewed-by: Heming Zhao <heming.zhao@...e.com>

> ---
>   fs/ocfs2/quota_global.c | 15 +++++++++------
>   1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
> index 0575c2d060eb..2b0daced98eb 100644
> --- a/fs/ocfs2/quota_global.c
> +++ b/fs/ocfs2/quota_global.c
> @@ -371,12 +371,16 @@ int ocfs2_global_read_info(struct super_block *sb, int type)
>   
>   	status = ocfs2_extent_map_get_blocks(oinfo->dqi_gqinode, 0, &oinfo->dqi_giblk,
>   					     &pcount, NULL);
> -	if (status < 0)
> +	if (status < 0) {
> +		mlog_errno(status);
>   		goto out_unlock;
> +	}
>   
>   	status = ocfs2_qinfo_lock(oinfo, 0);
> -	if (status < 0)
> +	if (status < 0) {
> +		mlog_errno(status);
>   		goto out_unlock;
> +	}
>   	status = sb->s_op->quota_read(sb, type, (char *)&dinfo,
>   				      sizeof(struct ocfs2_global_disk_dqinfo),
>   				      OCFS2_GLOBAL_INFO_OFF);
> @@ -404,12 +408,11 @@ int ocfs2_global_read_info(struct super_block *sb, int type)
>   	schedule_delayed_work(&oinfo->dqi_sync_work,
>   			      msecs_to_jiffies(oinfo->dqi_syncms));
>   
> -out_err:
> -	return status;
> +	return 0;
>   out_unlock:
>   	ocfs2_unlock_global_qf(oinfo, 0);
> -	mlog_errno(status);
> -	goto out_err;
> +out_err:
> +	return status;
>   }
>   
>   /* Write information to global quota file. Expects exclusive lock on quota

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ