]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove __KERNEL__ check from xfs_dir2_leaf.c
authorDave Chinner <dchinner@redhat.com>
Wed, 4 Sep 2013 22:05:42 +0000 (22:05 +0000)
committerRich Johnston <rjohnston@sgi.com>
Mon, 16 Sep 2013 20:14:45 +0000 (15:14 -0500)
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 <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
libxfs/xfs_dir2_leaf.c

index 8c20b9ec149fde16f2ddc9b88065e83736470f93..55b7d05a272b397797e367591e5440f9c5699519 100644 (file)
@@ -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.