From: Al Viro Date: Thu, 11 Apr 2024 14:53:39 +0000 (+0100) Subject: gfs2: more obvious initializations of mapping->host X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2d0026a4901be98000137af41bb42b6ead5a4c27;p=linux.git gfs2: more obvious initializations of mapping->host what's going on is copying the ->host of bdev's address_space Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20240411145346.2516848-4-viro@zeniv.linux.org.uk Signed-off-by: Christian Brauner --- diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 34540f9d011ca..1ebcf6c90f2b7 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1227,7 +1227,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, mapping = gfs2_glock2aspace(gl); if (mapping) { mapping->a_ops = &gfs2_meta_aops; - mapping->host = s->s_bdev->bd_inode; + mapping->host = s->s_bdev->bd_mapping->host; mapping->flags = 0; mapping_set_gfp_mask(mapping, GFP_NOFS); mapping->i_private_data = NULL; diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 572d58e86296f..fcf7dfd14f52a 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -114,7 +114,7 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) address_space_init_once(mapping); mapping->a_ops = &gfs2_rgrp_aops; - mapping->host = sb->s_bdev->bd_inode; + mapping->host = sb->s_bdev->bd_mapping->host; mapping->flags = 0; mapping_set_gfp_mask(mapping, GFP_NOFS); mapping->i_private_data = NULL;