xfs: remove redundant else for clean code
authorZeng Heng <zengheng4@huawei.com>
Sun, 18 Sep 2022 20:46:14 +0000 (06:46 +1000)
committerDave Chinner <david@fromorbit.com>
Sun, 18 Sep 2022 20:46:14 +0000 (06:46 +1000)
"else" is not generally useful after a return, so remove it for clean code.

There is no logical changes.

Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_log.c

index 386b0307aed8576a1a833f50aaf7df8b96b57c7d..f6e7e4fd72ae71da2fbe548cce0bad11b6f197b9 100644 (file)
@@ -226,12 +226,12 @@ xlog_ticket_reservation(
        if (head == &log->l_write_head) {
                ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV);
                return tic->t_unit_res;
-       } else {
-               if (tic->t_flags & XLOG_TIC_PERM_RESERV)
-                       return tic->t_unit_res * tic->t_cnt;
-               else
-                       return tic->t_unit_res;
        }
+
+       if (tic->t_flags & XLOG_TIC_PERM_RESERV)
+               return tic->t_unit_res * tic->t_cnt;
+
+       return tic->t_unit_res;
 }
 
 STATIC bool