summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
authorSteven Whitehouse <steve@chygwyn.com>2006-01-18 10:29:04 +0000
committerSteven Whitehouse <steve@chygwyn.com>2006-01-18 10:29:04 +0000
commit666a2c534cc6238932296a95c9e9c06ca3b73d97 (patch)
treec446ee47e6949f8315616b257bd82f918f3792db /fs/gfs2/bmap.c
parentc73530a1f9633b2e7e6e19d0274b575febf8e8dc (diff)
[GFS2] Remove unused code from various files
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r--fs/gfs2/bmap.c81
1 files changed, 1 insertions, 80 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 4b4e295b3bf..bece3620f1c 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -999,7 +999,7 @@ static int do_shrink(struct gfs2_inode *ip, uint64_t size,
}
/**
- * gfs2_truncatei - make a file a give size
+ * gfs2_truncatei - make a file a given size
* @ip: the inode
* @size: the size to make the file
* @truncator: function to truncate the last partial block
@@ -1125,82 +1125,3 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset,
return 0;
}
-/**
- * do_gfm - Copy out the dinode/indirect blocks of a file
- * @ip: the file
- * @dibh: the dinode buffer
- * @bh: the indirect buffer we're looking at
- * @top: the first pointer in the block
- * @bottom: one more than the last pointer in the block
- * @height: the height the block is at
- * @data: a pointer to a struct gfs2_user_buffer structure
- *
- * If this is a journaled file, copy out the data too.
- *
- * Returns: errno
- */
-
-static int do_gfm(struct gfs2_inode *ip, struct buffer_head *dibh,
- struct buffer_head *bh, uint64_t *top, uint64_t *bottom,
- unsigned int height, void *data)
-{
- struct gfs2_user_buffer *ub = (struct gfs2_user_buffer *)data;
- int error;
-
- error = gfs2_add_bh_to_ub(ub, bh);
- if (error)
- return error;
-
- if (!S_ISDIR(ip->i_di.di_mode) ||
- height + 1 != ip->i_di.di_height)
- return 0;
-
- for (; top < bottom; top++)
- if (*top) {
- struct buffer_head *data_bh;
-
- error = gfs2_meta_read(ip->i_gl, be64_to_cpu(*top),
- DIO_START | DIO_WAIT,
- &data_bh);
- if (error)
- return error;
-
- error = gfs2_add_bh_to_ub(ub, data_bh);
-
- brelse(data_bh);
-
- if (error)
- return error;
- }
-
- return 0;
-}
-
-/**
- * gfs2_get_file_meta - return all the metadata for a file
- * @ip: the file
- * @ub: the structure representing the meta
- *
- * Returns: errno
- */
-
-int gfs2_get_file_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub)
-{
- int error;
-
- if (gfs2_is_stuffed(ip)) {
- struct buffer_head *dibh;
- error = gfs2_meta_inode_buffer(ip, &dibh);
- if (!error) {
- error = gfs2_add_bh_to_ub(ub, dibh);
- brelse(dibh);
- }
- } else {
- struct metapath mp;
- find_metapath(ip, 0, &mp);
- error = recursive_scan(ip, NULL, &mp, 0, 0, 1, do_gfm, ub);
- }
-
- return error;
-}
-