aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 6b1dc3dc3a2d..f6304e55dbc1 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -2104,54 +2104,3 @@ int gfs2_diradd_alloc_required(struct gfs2_inode *dip, struct qstr *filename,
2104 return error; 2104 return error;
2105} 2105}
2106 2106
2107/**
2108 * do_gdm - copy out one leaf (or list of leaves)
2109 * @dip: the directory
2110 * @index: the hash table offset in the directory
2111 * @len: the number of pointers to this leaf
2112 * @leaf_no: the leaf number
2113 * @data: a pointer to a struct gfs2_user_buffer structure
2114 *
2115 * Returns: errno
2116 */
2117
2118static int do_gdm(struct gfs2_inode *dip, uint32_t index, uint32_t len,
2119 uint64_t leaf_no, void *data)
2120{
2121 struct gfs2_user_buffer *ub = (struct gfs2_user_buffer *)data;
2122 struct gfs2_leaf leaf;
2123 struct buffer_head *bh;
2124 uint64_t blk;
2125 int error = 0;
2126
2127 for (blk = leaf_no; blk; blk = leaf.lf_next) {
2128 error = get_leaf(dip, blk, &bh);
2129 if (error)
2130 break;
2131
2132 gfs2_leaf_in(&leaf, bh->b_data);
2133
2134 error = gfs2_add_bh_to_ub(ub, bh);
2135
2136 brelse(bh);
2137
2138 if (error)
2139 break;
2140 }
2141
2142 return error;
2143}
2144
2145/**
2146 * gfs2_get_dir_meta - return all the leaf blocks of a directory
2147 * @dip: the directory
2148 * @ub: the structure representing the meta
2149 *
2150 * Returns: errno
2151 */
2152
2153int gfs2_get_dir_meta(struct gfs2_inode *dip, struct gfs2_user_buffer *ub)
2154{
2155 return foreach_leaf(dip, do_gdm, ub);
2156}
2157