summaryrefslogtreecommitdiff
path: root/fs/fat/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-03-11 21:02:06 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-03-11 21:02:06 +0300
commit0f1a876682f0979d6a1e5f86861dd562d1758936 (patch)
tree8f366cddf7bf5544d0af8266e99ff1718f977a28 /fs/fat/inode.c
parent910202f00a435c56cf000bc6d45ecaabac4dd598 (diff)
parent01edea1bbd1768be41729fd018a82556fa1810ec (diff)
downloadlinux-0f1a876682f0979d6a1e5f86861dd562d1758936.tar.xz
Merge tag 'vfs-6.9.uuid' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs uuid updates from Christian Brauner: "This adds two new ioctl()s for getting the filesystem uuid and retrieving the sysfs path based on the path of a mounted filesystem. Getting the filesystem uuid has been implemented in filesystem specific code for a while it's now lifted as a generic ioctl" * tag 'vfs-6.9.uuid' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: xfs: add support for FS_IOC_GETFSSYSFSPATH fs: add FS_IOC_GETFSSYSFSPATH fat: Hook up sb->s_uuid fs: FS_IOC_GETUUID ovl: convert to super_set_uuid() fs: super_set_uuid()
Diffstat (limited to 'fs/fat/inode.c')
-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;