[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170528102008.30276-22-hch@lst.de>
Date: Sun, 28 May 2017 13:20:07 +0300
From: Christoph Hellwig <hch@....de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Amir Goldstein <amir73il@...il.com>,
linux-fsdevel@...r.kernel.org
Cc: Shaohua Li <shli@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
David Howells <dhowells@...hat.com>,
Steven Whitehouse <swhiteho@...hat.com>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>,
linux-xfs@...r.kernel.org, linux-raid@...r.kernel.org,
linux-nvdimm@...ts.01.org, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org, Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 21/22] tmpfs: generate random sb->s_uuid
From: Amir Goldstein <amir73il@...il.com>
This is used by overlayfs to encode intrasystem unique file handles.
Suggested-by: Miklos Szeredi <mszeredi@...hat.com>
Cc: Hugh Dickins <hughd@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Amir Goldstein <amir73il@...il.com>
Signed-off-by: Christoph Hellwig <hch@....de>
---
mm/shmem.c | 2 ++
1 file changed, 2 insertions(+)
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)
--
2.11.0
Powered by blists - more mailing lists