From: Dave Chinner Date: Mon, 12 Aug 2013 10:49:52 +0000 (+1000) Subject: xfs: remove __KERNEL__ check from xfs_dir2_leaf.c X-Git-Tag: Ubuntu-5.10.0-12.13~18383^2~75 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cb9eabff58390a22ba8e4b0c838cbf2efb192225;p=mirror_ubuntu-hirsute-kernel.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: Ben Myers --- diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c index 5505edb9b2ff..591eaf235919 100644 --- a/fs/xfs/xfs_dir2_leaf.c +++ b/fs/xfs/xfs_dir2_leaf.c @@ -1586,10 +1586,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.