diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 4b4e295..bece362 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -999,7 +999,7 @@
 }
 
 /**
- * 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 @@
 	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;
-}
-
diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h
index de16e44..25ea329 100644
--- a/fs/gfs2/bmap.h
+++ b/fs/gfs2/bmap.h
@@ -34,6 +34,4 @@
 int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset,
 			      unsigned int len, int *alloc_required);
 
-int gfs2_get_file_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub);
-
 #endif /* __BMAP_DOT_H__ */
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 6b1dc3dc..f6304e5 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -2104,54 +2104,3 @@
 	return error;
 }
 
-/**
- * do_gdm - copy out one leaf (or list of leaves)
- * @dip: the directory
- * @index: the hash table offset in the directory
- * @len: the number of pointers to this leaf
- * @leaf_no: the leaf number
- * @data: a pointer to a struct gfs2_user_buffer structure
- *
- * Returns: errno
- */
-
-static int do_gdm(struct gfs2_inode *dip, uint32_t index, uint32_t len,
-		  uint64_t leaf_no, void *data)
-{
-	struct gfs2_user_buffer *ub = (struct gfs2_user_buffer *)data;
-	struct gfs2_leaf leaf;
-	struct buffer_head *bh;
-	uint64_t blk;
-	int error = 0;
-
-	for (blk = leaf_no; blk; blk = leaf.lf_next) {
-		error = get_leaf(dip, blk, &bh);
-		if (error)
-			break;
-
-		gfs2_leaf_in(&leaf, bh->b_data);
-
-		error = gfs2_add_bh_to_ub(ub, bh);
-
-		brelse(bh);
-
-		if (error)
-			break;
-	}
-
-	return error;
-}
-
-/**
- * gfs2_get_dir_meta - return all the leaf blocks of a directory
- * @dip: the directory
- * @ub: the structure representing the meta
- *
- * Returns: errno
- */
-
-int gfs2_get_dir_meta(struct gfs2_inode *dip, struct gfs2_user_buffer *ub)
-{
-	return foreach_leaf(dip, do_gdm, ub);
-}
-
diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h
index 79f77aa..ff6d1c5 100644
--- a/fs/gfs2/dir.h
+++ b/fs/gfs2/dir.h
@@ -46,6 +46,4 @@
 int gfs2_diradd_alloc_required(struct gfs2_inode *dip, struct qstr *filename,
 			      int *alloc_required);
 
-int gfs2_get_dir_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub);
-
 #endif /* __DIR_DOT_H__ */
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c
index 63a5cf1..dec55dc 100644
--- a/fs/gfs2/eattr.c
+++ b/fs/gfs2/eattr.c
@@ -1561,60 +1561,3 @@
 	return error;
 }
 
-/**
- * gfs2_get_eattr_meta - return all the eattr blocks of a file
- * @dip: the directory
- * @ub: the structure representing the user buffer to copy to
- *
- * Returns: errno
- */
-
-int gfs2_get_eattr_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub)
-{
-	struct buffer_head *bh;
-	int error;
-
-	error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr,
-			       DIO_START | DIO_WAIT, &bh);
-	if (error)
-		return error;
-
-	gfs2_add_bh_to_ub(ub, bh);
-
-	if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) {
-		struct buffer_head *eabh;
-		uint64_t *eablk, *end;
-
-		if (gfs2_metatype_check(ip->i_sbd, bh, GFS2_METATYPE_IN)) {
-			error = -EIO;
-			goto out;
-		}
-
-		eablk = (uint64_t *)(bh->b_data +
-				     sizeof(struct gfs2_meta_header));
-		end = eablk + ip->i_sbd->sd_inptrs;
-
-		for (; eablk < end; eablk++) {
-			uint64_t bn;
-
-			if (!*eablk)
-				break;
-			bn = be64_to_cpu(*eablk);
-
-			error = gfs2_meta_read(ip->i_gl, bn,
-					       DIO_START | DIO_WAIT, &eabh);
-			if (error)
-				break;
-			gfs2_add_bh_to_ub(ub, eabh);
-			brelse(eabh);
-			if (error)
-				break;
-		}
-	}
-
- out:
-	brelse(bh);
-
-	return error;
-}
-
diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h
index a640392..e5a42ab 100644
--- a/fs/gfs2/eattr.h
+++ b/fs/gfs2/eattr.h
@@ -74,8 +74,6 @@
 
 int gfs2_ea_dealloc(struct gfs2_inode *ip);
 
-int gfs2_get_eattr_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub);
-
 /* Exported to acl.c */
 
 int gfs2_ea_find(struct gfs2_inode *ip,
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c
index 74e2c62..ad49153 100644
--- a/fs/gfs2/util.c
+++ b/fs/gfs2/util.c
@@ -221,36 +221,6 @@
 	return rv;
 }
 
-/**
- * gfs2_add_bh_to_ub - copy a buffer up to user space
- * @ub: the structure representing where to copy
- * @bh: the buffer
- *
- * Returns: errno
- */
-
-int gfs2_add_bh_to_ub(struct gfs2_user_buffer *ub, struct buffer_head *bh)
-{
-	uint64_t blkno = bh->b_blocknr;
-
-	if (ub->ub_count + sizeof(uint64_t) + bh->b_size > ub->ub_size)
-		return -ENOMEM;
-
-	if (copy_to_user(ub->ub_data + ub->ub_count,
-			  &blkno,
-			  sizeof(uint64_t)))
-		return -EFAULT;
-	ub->ub_count += sizeof(uint64_t);
-
-	if (copy_to_user(ub->ub_data + ub->ub_count,
-			  bh->b_data,
-			  bh->b_size))
-		return -EFAULT;
-	ub->ub_count += bh->b_size;
-
-	return 0;
-}
-
 void gfs2_icbit_munge(struct gfs2_sbd *sdp, unsigned char **bitmap,
 		      unsigned int bit, int new_value)
 {
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h
index 21466fe..8d6eba3 100644
--- a/fs/gfs2/util.h
+++ b/fs/gfs2/util.h
@@ -152,14 +152,6 @@
 extern kmem_cache_t *gfs2_inode_cachep;
 extern kmem_cache_t *gfs2_bufdata_cachep;
 
-struct gfs2_user_buffer {
-	char __user *ub_data;
-	unsigned int ub_size;
-	unsigned int ub_count;
-};
-
-int gfs2_add_bh_to_ub(struct gfs2_user_buffer *ub, struct buffer_head *bh);
-
 static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt,
 					   unsigned int *p)
 {
