From: Amir Goldstein Date: Thu, 18 May 2017 12:29:33 +0000 (+0300) Subject: tmpfs: generate random sb->s_uuid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b4db79618ade14a9566455cbbea339f74674789;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git tmpfs: generate random sb->s_uuid This is used by overlayfs to encode intrasystem unique file handles. Suggested-by: Miklos Szeredi Cc: Hugh Dickins Cc: Andrew Morton Signed-off-by: Amir Goldstein Signed-off-by: Christoph Hellwig --- diff --git a/mm/shmem.c b/mm/shmem.c index e67d6ba4e98e..391f2dcca727 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -75,6 +75,7 @@ static struct vfsmount *shm_mnt; #include #include #include +#include #include #include @@ -3761,6 +3762,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) #ifdef CONFIG_TMPFS_POSIX_ACL sb->s_flags |= MS_POSIXACL; #endif + uuid_gen(&sb->s_uuid); inode = shmem_get_inode(sb, NULL, S_IFDIR | sbinfo->mode, 0, VM_NORESERVE); if (!inode)