diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-03 15:42:02 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-03 15:45:26 -0500 |
commit | d5abc6d8f31dac8900b04a15e5ce5255315a0197 (patch) | |
tree | 0d9ea7afc8db30c0c8d55295a36cbc07a15bf4f7 | |
parent | 350bc16072dd78f02cbb37575eb54afa9ec8ce18 (diff) |
fat: Hook up sb->s_uuidfs-uuid-ioctl
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>
-rw-r--r-- | fs/fat/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |