diff mbox series

[2/3] bcachefs: Initialize super_block->s_uuid

Message ID 20240315035308.3563511-3-kent.overstreet@linux.dev (mailing list archive)
State New, archived
Headers show
Series bit more FS_IOC_GETFSUUID, FS_IOC_GETFSSYSFSPATH | expand

Commit Message

Kent Overstreet March 15, 2024, 3:53 a.m. UTC
Need to fix this oversight for the new UUID/sysfspath ioctls; also,
initialize the sysfs path.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 fs/bcachefs/fs.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index ec9cf4b8faf1..cfc9d90ab179 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1881,6 +1881,9 @@  static struct dentry *bch2_mount(struct file_system_type *fs_type,
 	c->vfs_sb		= sb;
 	strscpy(sb->s_id, c->name, sizeof(sb->s_id));
 
+	super_set_uuid(sb, c->sb.user_uuid.b, 16);
+	super_set_sysfs_name_uuid(sb);
+
 	ret = super_setup_bdi(sb);
 	if (ret)
 		goto err_put_super;