ext4: factor out htree rep invariant check
authorVinicius Tinti <viniciustinti@gmail.com>
Tue, 2 Feb 2021 16:28:37 +0000 (16:28 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Feb 2021 05:34:02 +0000 (00:34 -0500)
commitc6c818e50d1982ebac4dcd3ae18c1b49a66ebacb
tree539e861fad521fdba613dd7021fe7a3e53bfa519
parent96e7c02d0bbca9f33fb4175e5f302dab1de6f985
ext4: factor out htree rep invariant check

This patch moves some debugging code which is used to validate the
hash tree node when doing a binary search of an htree node into a
separate function, which is disabled by default (since it is only used
by developers when they are modifying the htree code paths).

In addition to cleaning up the code to make it more maintainable, it
silences a Clang compiler warning when -Wunreachable-code-aggressive
is enabled.  (There is no plan to enable this warning by default, since
there it has far too many false positives; nevertheless, this commit
reduces one of the many false positives by one.)

Signed-off-by: Vinicius Tinti <viniciustinti@gmail.com>
Link: https://lore.kernel.org/r/20210202162837.129631-1-viniciustinti@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/namei.c