diff options
author | Christoph Hellwig <hch@lst.de> | 2011-07-08 14:34:59 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2011-07-08 14:34:59 +0200 |
commit | 4fb44c8272a071290d2ad76164c532fa2902b604 (patch) | |
tree | a3e36278df268b0bd99c12455ba6e4c8ced478cf /fs/xfs/xfs_dir2_leaf.h | |
parent | xfs: kill the unused struct xfs_sync_work (diff) | |
download | linux-4fb44c8272a071290d2ad76164c532fa2902b604.tar.xz linux-4fb44c8272a071290d2ad76164c532fa2902b604.zip |
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.h b/fs/xfs/xfs_dir2_leaf.h index 6c9539f06987..bc620622c342 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__ */ |