[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240205200529.546646-4-kent.overstreet@linux.dev>
Date: Mon, 5 Feb 2024 15:05:14 -0500
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
linux-btrfs@...r.kernel.org,
linux-xfs@...r.kernel.org,
linux-ext4@...r.kernel.org
Cc: Kent Overstreet <kent.overstreet@...ux.dev>
Subject: [PATCH 3/6] fat: Hook up sb->s_uuid
Now that we have a standard ioctl for querying the filesystem UUID,
initialize sb->s_uuid so that it works.
Signed-off-by: Kent Overstreet <kent.overstreet@...ux.dev>
---
fs/fat/inode.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 1fac3dabf130..a3d3478442d1 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1762,6 +1762,10 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
else /* fat 16 or 12 */
sbi->vol_id = bpb.fat16_vol_id;
+ __le32 vol_id_le = cpu_to_le32(sbi->vol_id);
+ memcpy(&sb->s_uuid, &vol_id_le, sizeof(vol_id_le));
+ sb->s_uuid_len = sizeof(vol_id_le);
+
sbi->dir_per_block = sb->s_blocksize / sizeof(struct msdos_dir_entry);
sbi->dir_per_block_bits = ffs(sbi->dir_per_block) - 1;
--
2.43.0
Powered by blists - more mailing lists