From: Dave Chinner Date: Wed, 4 Sep 2013 22:05:42 +0000 (+0000) Subject: xfs: remove __KERNEL__ check from xfs_dir2_leaf.c X-Git-Tag: v3.2.0-alpha1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99fcccbb69b1f1b285c40546f78e4178099a4e90;p=thirdparty%2Fxfsprogs-dev.git xfs: remove __KERNEL__ check from xfs_dir2_leaf.c It's actually an ifndef section, which means it is only included in userspace. however, it's deep within the libxfs code, so it's unlikely that the condition checked in userspace can actually occur (search an empty leaf) through the libxfs interfaces. i.e. if it can happen in usrspace, it can happen in the kernel, so remove it from userspace too.... Signed-off-by: Dave Chinner Reviewed-by: Mark Tinguely Signed-off-by: Rich Johnston --- diff --git a/libxfs/xfs_dir2_leaf.c b/libxfs/xfs_dir2_leaf.c index 8c20b9ec1..55b7d05a2 100644 --- a/libxfs/xfs_dir2_leaf.c +++ b/libxfs/xfs_dir2_leaf.c @@ -1568,10 +1568,6 @@ xfs_dir2_leaf_search_hash( ents = xfs_dir3_leaf_ents_p(leaf); xfs_dir3_leaf_hdr_from_disk(&leafhdr, leaf); -#ifndef __KERNEL__ - if (!leafhdr.count) - return 0; -#endif /* * Note, the table cannot be empty, so we have to go through the loop. * Binary search the leaf entries looking for our hash value.