diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-05-18 15:29:33 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-06-05 16:59:19 +0200 |
commit | 2b4db79618ade14a9566455cbbea339f74674789 (patch) | |
tree | 25cb54994838d6cebba0ab3992c3bd97982eedae /mm/shmem.c | |
parent | bf47643389bbc1164c2615dc420ed0010264222e (diff) | |
download | linux-next-2b4db79618ade14a9566455cbbea339f74674789.tar.gz |
tmpfs: generate random sb->s_uuid
This is used by overlayfs to encode intrasystem unique file handles.
Suggested-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 <uapi/linux/memfd.h> #include <linux/userfaultfd_k.h> #include <linux/rmap.h> +#include <linux/uuid.h> #include <linux/uaccess.h> #include <asm/pgtable.h> @@ -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) |