Return-Path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:34987 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932253AbdERM3V (ORCPT ); Thu, 18 May 2017 08:29:21 -0400 From: Amir Goldstein To: Christoph Hellwig Cc: Andy Shevchenko , Miklos Szeredi , linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Hugh Dickins , Andrew Morton Subject: [PATCH v2] tmpfs: generate random sb->s_uuid Date: Thu, 18 May 2017 15:29:33 +0300 Message-Id: <1495110573-9473-1-git-send-email-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 --- mm/shmem.c | 2 ++ 1 file changed, 2 insertions(+) Christoph, Please apply to your uuid branch. Thanks, Amir. diff --git a/mm/shmem.c b/mm/shmem.c index e67d6ba..cbd4521 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) -- 2.7.4