diff options
author | Yangtao Li <frank.li@vivo.com> | 2022-11-11 19:13:49 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-11-28 23:46:33 +0300 |
commit | 5b7b74b71c7fefbaa3e0ccc120c3cbd50b3fad86 (patch) | |
tree | 4e1f9083554aafd0863dd1aaeb8daeb7f03fa82d /fs/f2fs | |
parent | d3b7b4afd6b2c344eabf9cc26b8bfa903c164c7c (diff) | |
download | linux-5b7b74b71c7fefbaa3e0ccc120c3cbd50b3fad86.tar.xz |
f2fs: remove submit label in __submit_discard_cmd()
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>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/segment.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 5ac026a57228..8b0b76550578 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1143,13 +1143,12 @@ 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); -submit: + } if (err) { spin_lock_irqsave(&dc->lock, flags); if (dc->state == D_PARTIAL) |