aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/meta_io.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2021-03-25 18:48:49 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2021-04-03 21:38:12 +0200
commit6d8da302aedf9ff32c1579cbf91705a78538cb9e (patch)
tree899736abae733fb5cf2dc8403ef320f3aa02452a /fs/gfs2/meta_io.c
parent152f58c9af21abf913699e671b425fd38447b170 (diff)
downloadlinux-6d8da302aedf9ff32c1579cbf91705a78538cb9e.tar.gz
gfs2: Turn gfs2_meta_indirect_buffer into gfs2_meta_buffer
Instead of only supporting GFS2_METATYPE_DI and GFS2_METATYPE_IN blocks, make the block type a parameter of gfs2_meta_indirect_buffer and rename the function to gfs2_meta_buffer. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/meta_io.c')
-rw-r--r--fs/gfs2/meta_io.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index c38e3805f46899..b4fd4612b25b40 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -466,23 +466,22 @@ void gfs2_journal_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen)
}
/**
- * gfs2_meta_indirect_buffer - Get a metadata buffer
+ * gfs2_meta_buffer - Get a metadata buffer
* @ip: The GFS2 inode
- * @height: The level of this buf in the metadata (indir addr) tree (if any)
+ * @mtype: The block type (GFS2_METATYPE_*)
* @num: The block number (device relative) of the buffer
* @bhp: the buffer is returned here
*
* Returns: errno
*/
-int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, u64 num,
- struct buffer_head **bhp)
+int gfs2_meta_buffer(struct gfs2_inode *ip, u32 mtype, u64 num,
+ struct buffer_head **bhp)
{
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
struct gfs2_glock *gl = ip->i_gl;
struct buffer_head *bh;
int ret = 0;
- u32 mtype = height ? GFS2_METATYPE_IN : GFS2_METATYPE_DI;
int rahead = 0;
if (num == ip->i_no_addr)