summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_dir2_leaf.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-08 12:34:59 (GMT)
committerChristoph Hellwig <hch@lst.de>2011-07-08 12:34:59 (GMT)
commit4fb44c8272a071290d2ad76164c532fa2902b604 (patch)
treea3e36278df268b0bd99c12455ba6e4c8ced478cf /fs/xfs/xfs_dir2_leaf.h
parent29d104af0a92ba1eac74b636da7fcf88242e1180 (diff)
downloadlinux-fsl-qoriq-4fb44c8272a071290d2ad76164c532fa2902b604.tar.xz
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>
Diffstat (limited to 'fs/xfs/xfs_dir2_leaf.h')
-rw-r--r--fs/xfs/xfs_dir2_leaf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.h b/fs/xfs/xfs_dir2_leaf.h
index 6c9539f..bc62062 100644
--- a/fs/xfs/xfs_dir2_leaf.h
+++ b/fs/xfs/xfs_dir2_leaf.h
@@ -248,6 +248,9 @@ extern int xfs_dir2_leaf_search_hash(struct xfs_da_args *args,
struct xfs_dabuf *lbp);
extern int xfs_dir2_leaf_trim_data(struct xfs_da_args *args,
struct xfs_dabuf *lbp, xfs_dir2_db_t db);
+extern xfs_dir2_leaf_entry_t *xfs_dir2_leaf_find_entry(xfs_dir2_leaf_t *, int,
+ int, int, int,
+ int *, int *);
extern int xfs_dir2_node_to_leaf(struct xfs_da_state *state);
#endif /* __XFS_DIR2_LEAF_H__ */