Skip to content

Commit 5617104

Browse files
henryZedchinner
authored andcommitted
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 <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent 460281c commit 5617104

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/xfs/xfs_log.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ xlog_ticket_reservation(
226226
if (head == &log->l_write_head) {
227227
ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV);
228228
return tic->t_unit_res;
229-
} else {
230-
if (tic->t_flags & XLOG_TIC_PERM_RESERV)
231-
return tic->t_unit_res * tic->t_cnt;
232-
else
233-
return tic->t_unit_res;
234229
}
230+
231+
if (tic->t_flags & XLOG_TIC_PERM_RESERV)
232+
return tic->t_unit_res * tic->t_cnt;
233+
234+
return tic->t_unit_res;
235235
}
236236

237237
STATIC bool

0 commit comments

Comments
 (0)