summaryrefslogtreecommitdiff
path: root/fs/fat
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-02-06 21:56:18 -0500
committerChristian Brauner <brauner@kernel.org>2024-02-08 21:20:12 +0100
commite2f7dd6e55d2f39734abcebd0cf673700e206197 (patch)
tree635a696ea103a3ab49598197fd709d69fa17b50c /fs/fat
parent41bcbe59c3b3fa7171dd2e3a365e6d5154198f30 (diff)
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@linux.dev> Link: https://lore.kernel.org/r/20240207025624.1019754-5-kent.overstreet@linux.dev Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 1fac3dabf130..5c813696d1ff 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1762,6 +1762,9 @@ 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);
+ super_set_uuid(sb, (void *) &vol_id_le, 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;