public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Yangtao Li <frank.li@vivo.com>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: remove submit label in __submit_discard_cmd()
Date: Tue, 15 Nov 2022 09:36:06 +0800	[thread overview]
Message-ID: <9c5d267e-d040-0e67-27fc-d6ff6e5dae25@kernel.org> (raw)
In-Reply-To: <Y3LF7SjCLKaz7OWi@google.com>

On 2022/11/15 6:49, Jaegeuk Kim wrote:
> On 11/12, Yangtao Li wrote:
>> Complaint from Matthew Wilcox in another similar place:
>>
>> 	"submit?  You don't submit anything at the 'submit' label.
>> 	it should be called 'skip' or something.  But I think this
>> 	is just badly written and you don't need a goto at all."
>>
>> Let's remove submit label for readability.
>>
>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
>> ---
>>   fs/f2fs/segment.c | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
>> index 3654c30e0517..0a72e787c585 100644
>> --- a/fs/f2fs/segment.c
>> +++ b/fs/f2fs/segment.c
>> @@ -1144,13 +1144,11 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi,
>>   		if (time_to_inject(sbi, FAULT_DISCARD)) {
>>   			f2fs_show_injection_info(sbi, FAULT_DISCARD);
>>   			err = -EIO;
>> -			goto submit;
>> -		}
>> -		err = __blkdev_issue_discard(bdev,
>> +		} else
>> +			err = __blkdev_issue_discard(bdev,
>>   					SECTOR_FROM_BLOCK(start),
>>   					SECTOR_FROM_BLOCK(len),
>>   					GFP_NOFS, &bio);
> 
> Thanks. I added {} to meet the coding style.

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

> 
>> -submit:
>>   		if (err) {
>>   			spin_lock_irqsave(&dc->lock, flags);
>>   			if (dc->state == D_PARTIAL)
>> -- 
>> 2.25.1

      reply	other threads:[~2022-11-15  1:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 16:13 [PATCH] f2fs: remove submit label in __submit_discard_cmd() Yangtao Li
2022-11-14 22:49 ` Jaegeuk Kim
2022-11-15  1:36   ` 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=9c5d267e-d040-0e67-27fc-d6ff6e5dae25@kernel.org \
    --to=chao@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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