diff options
author | Zeng Heng <zengheng4@huawei.com> | 2022-09-19 06:46:14 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2022-09-19 06:46:14 +1000 |
commit | 5617104003ae11a1ab383dbd63228b7645c26207 (patch) | |
tree | 07f6d4730dcd558a6900a22785c175aa6cc7ac34 | |
parent | 460281cf269b02f2caa88ade79c1e7eed29bfe15 (diff) | |
download | linux-stable-5617104003ae11a1ab383dbd63228b7645c26207.tar.gz linux-stable-5617104003ae11a1ab383dbd63228b7645c26207.tar.bz2 linux-stable-5617104003ae11a1ab383dbd63228b7645c26207.zip |
xfs: remove redundant else for clean code
"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>
-rw-r--r-- | fs/xfs/xfs_log.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 386b0307aed8..f6e7e4fd72ae 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -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 |