提交 cb9eabff 编写于 作者: D Dave Chinner 提交者: Ben Myers

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: NDave Chinner <dchinner@redhat.com>
Reviewed-by: NMark Tinguely <tinguely@sgi.com>
Signed-off-by: NBen Myers <bpm@sgi.com>
上级 b49a0c18
...@@ -1586,10 +1586,6 @@ xfs_dir2_leaf_search_hash( ...@@ -1586,10 +1586,6 @@ xfs_dir2_leaf_search_hash(
ents = xfs_dir3_leaf_ents_p(leaf); ents = xfs_dir3_leaf_ents_p(leaf);
xfs_dir3_leaf_hdr_from_disk(&leafhdr, 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. * Note, the table cannot be empty, so we have to go through the loop.
* Binary search the leaf entries looking for our hash value. * Binary search the leaf entries looking for our hash value.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册