xfs: factor out xfs_dir2_leaf_find_entry
authorChristoph Hellwig <hch@lst.de>
Fri, 8 Jul 2011 12:34:59 +0000 (14:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 8 Jul 2011 12:34:59 +0000 (14:34 +0200)
commit4fb44c8272a071290d2ad76164c532fa2902b604
treea3e36278df268b0bd99c12455ba6e4c8ced478cf
parent29d104af0a92ba1eac74b636da7fcf88242e1180
xfs: factor out xfs_dir2_leaf_find_entry

Add a new xfs_dir2_leaf_find_entry helper to factor out some duplicate code
from xfs_dir2_leaf_addname xfs_dir2_leafn_add.  Found by Eric Sandeen using
an automated code duplication checker.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_dir2_leaf.c
fs/xfs/xfs_dir2_leaf.h
fs/xfs/xfs_dir2_node.c