From: Chao Yu <chao@kernel.org>
To: "wangjianjian (C)" <wangjianjian3@huawei.com>,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix incorrect return value
Date: Thu, 11 Apr 2024 17:28:54 +0800 [thread overview]
Message-ID: <c715f840-0ba3-4074-81af-9947dcc9756f@kernel.org> (raw)
In-Reply-To: <1c059a01-ec24-4fd4-9e66-7989d07e3207@huawei.com>
On 2024/4/9 14:47, wangjianjian (C) via Linux-f2fs-devel wrote:
> On 2024/4/7 14:23, Chao Yu wrote:
>> On 2024/4/4 21:47, Wang Jianjian wrote:
>>> dquot_mark_dquot_dirty returns old dirty state not the error code.
>>
>> I think it's fine to just pass return value of dquot_mark_dquot_dirty()
>> to caller, because caller can distinguish status from return value:
>> 1) < 0, there is an error, 2) >= 0, there is no error, previously it is
>> dirty if it is 1.
> mark_all_dquot_dirty uses if return value is 0 to save error code. It may cause mess.
I didn't get your point...
No caller of mark_all_dquot_dirty() cares about its return value, so,
I think there is no practical problem now.
> By the way, I am fine don't change it.
>
>>
>> Thanks,
>>
>>>
>>> Signed-off-by: Wang Jianjian <wangjianjian0@foxmail.com>
>>> ---
>>> fs/f2fs/super.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
>>> index a6867f26f141..af07027475d9 100644
>>> --- a/fs/f2fs/super.c
>>> +++ b/fs/f2fs/super.c
>>> @@ -3063,13 +3063,13 @@ static int f2fs_dquot_mark_dquot_dirty(struct dquot *dquot)
>>> {
>>> struct super_block *sb = dquot->dq_sb;
>>> struct f2fs_sb_info *sbi = F2FS_SB(sb);
>>> - int ret = dquot_mark_dquot_dirty(dquot);
>>> + dquot_mark_dquot_dirty(dquot);
>>> /* if we are using journalled quota */
>>> if (is_journalled_quota(sbi))
>>> set_sbi_flag(sbi, SBI_QUOTA_NEED_FLUSH);
>>> - return ret;
>>> + return 0;
>>> }
>>> static int f2fs_dquot_commit_info(struct super_block *sb, int type)
>>
>>
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
prev parent reply other threads:[~2024-04-11 9:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 13:47 [f2fs-dev] [PATCH] f2fs: Fix incorrect return value Wang Jianjian
2024-04-07 6:23 ` Chao Yu
2024-04-09 6:47 ` wangjianjian (C) via Linux-f2fs-devel
2024-04-11 9:28 ` Chao Yu [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=c715f840-0ba3-4074-81af-9947dcc9756f@kernel.org \
--to=chao@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=wangjianjian3@huawei.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;
as well as URLs for NNTP newsgroup(s).