fs: introduce a wrapper uuid_to_fsid()
authorAmir Goldstein <amir73il@gmail.com>
Mon, 22 Mar 2021 17:39:43 +0000 (19:39 +0200)
committerJan Kara <jack@suse.cz>
Mon, 19 Apr 2021 14:03:15 +0000 (16:03 +0200)
commit9591c3a34f7722bd77f42c98d76fd5a5bad465f0
tree44001867b11da3de1fa029e50ab636ea381c0c7a
parent22d483b99863202e3631ff66fa0f3c2302c0f96f
fs: introduce a wrapper uuid_to_fsid()

Some filesystem's use a digest of their uuid for f_fsid.
Create a simple wrapper for this open coded folding.

Filesystems that have a non null uuid but use the block device
number for f_fsid may also consider using this helper.

[JK: Added missing asm/byteorder.h include]
Link: https://lore.kernel.org/r/20210322173944.449469-2-amir73il@gmail.com
Acked-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/super.c
fs/ext4/super.c
fs/zonefs/super.c
include/linux/statfs.h