]> git.ipfire.org Git - thirdparty/linux.git/commit
ocfs2: correctly use ocfs2_find_next_zero_bit()
authorJoseph Qi <joseph.qi@linux.alibaba.com>
Thu, 14 Mar 2024 02:17:13 +0000 (10:17 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 04:07:01 +0000 (21:07 -0700)
commit30dd3478c3cd7d01cc5afc4952e885ba4eefb730
treebd56bced69e421827a64c7c60d7d9eb6631c84d1
parent0bbac3facb5d6cc0171c45c9873a2dc96bea9680
ocfs2: correctly use ocfs2_find_next_zero_bit()

If no bits are zero, ocfs2_find_next_zero_bit() will return max size, so
check the return value with -1 is meaningless.  Correct this usage and
cleanup the code.

Link: https://lkml.kernel.org/r/20240314021713.240796-1-joseph.qi@linux.alibaba.com
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Heming Zhao <heming.zhao@suse.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>
fs/ocfs2/localalloc.c
fs/ocfs2/reservations.c
fs/ocfs2/suballoc.c