diff mbox series

[RFC,4/5] btrfs: Set s_bdev for btrfs super block

Message ID 0dfdf1aea018b4a06774f0117ef0af51944ecb46.1634933122.git.rgoldwyn@suse.com (mailing list archive)
State New, archived
Headers show
Series Shared memory for shared extents | expand

Commit Message

Goldwyn Rodrigues Oct. 22, 2021, 8:15 p.m. UTC
From: Goldwyn Rodrigues <rgoldwyn@suse.com>

s_bdev is not set. Use the latest bdev to setup s_bdev.
reads are performed on block device directly and derived from super
block ->s_bdev field.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 fs/btrfs/super.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 432f40f72466..9588a42d7a49 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1749,6 +1749,7 @@  static struct dentry *btrfs_mount_root(struct file_system_type *fs_type,
 		deactivate_locked_super(s);
 		return ERR_PTR(error);
 	}
+	s->s_bdev = bdev;
 
 	return dget(s->s_root);