f2fs: remove submit label in __submit_discard_cmd()
authorYangtao Li <frank.li@vivo.com>
Fri, 11 Nov 2022 16:13:49 +0000 (00:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Nov 2022 20:46:33 +0000 (12:46 -0800)
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>
fs/f2fs/segment.c

index 5ac026a572287c6b1f8ba3eae7e0683fef267ca1..8b0b76550578555cd350222248d5f1c112ba182d 100644 (file)
@@ -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)