From: "heming.zhao@suse.com" <heming.zhao@suse.com>
To: Joseph Qi <joseph.qi@linux.alibaba.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
syzbot+f7af59df5d6b25f0febd@syzkaller.appspotmail.com
Subject: Re: [PATCH v2 2/2] ocfs2: cleanup return value and mlog in ocfs2_global_read_info()
Date: Wed, 4 Sep 2024 15:33:42 +0800 [thread overview]
Message-ID: <9f551194-6e86-41ae-86f7-e9387fbc4871@suse.com> (raw)
In-Reply-To: <20240904071004.2067695-2-joseph.qi@linux.alibaba.com>
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@linux.alibaba.com>
Looks good to me.
Reviewed-by: Heming Zhao <heming.zhao@suse.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
next prev parent reply other threads:[~2024-09-04 7:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 7:10 [PATCH v2 1/2] ocfs2: cancel dqi_sync_work before freeing oinfo Joseph Qi
2024-09-04 7:10 ` [PATCH v2 2/2] ocfs2: cleanup return value and mlog in ocfs2_global_read_info() Joseph Qi
2024-09-04 7:33 ` heming.zhao [this message]
2024-09-04 7:33 ` [PATCH v2 1/2] ocfs2: cancel dqi_sync_work before freeing oinfo heming.zhao
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=9f551194-6e86-41ae-86f7-e9387fbc4871@suse.com \
--to=heming.zhao@suse.com \
--cc=akpm@linux-foundation.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ocfs2-devel@lists.linux.dev \
--cc=syzbot+f7af59df5d6b25f0febd@syzkaller.appspotmail.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
all inboxes | Powered by JetHome®