Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocfs2: use max() to improve ocfs2_dlm_seq_show()

Use the max() macro to simplify the ocfs2_dlm_seq_show() function and
improve its readability.

Link: https://lkml.kernel.org/r/20240820021605.97887-3-thorsten.blum@toblux.com
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Thorsten Blum and committed by
Andrew Morton
105ae044 7f86b294

+2 -5
+2 -5
fs/ocfs2/dlmglue.c
··· 3151 3151 #ifdef CONFIG_OCFS2_FS_STATS 3152 3152 if (!lockres->l_lock_wait && dlm_debug->d_filter_secs) { 3153 3153 now = ktime_to_us(ktime_get_real()); 3154 - if (lockres->l_lock_prmode.ls_last > 3155 - lockres->l_lock_exmode.ls_last) 3156 - last = lockres->l_lock_prmode.ls_last; 3157 - else 3158 - last = lockres->l_lock_exmode.ls_last; 3154 + last = max(lockres->l_lock_prmode.ls_last, 3155 + lockres->l_lock_exmode.ls_last); 3159 3156 /* 3160 3157 * Use d_filter_secs field to filter lock resources dump, 3161 3158 * the default d_filter_secs(0) value filters nothing,