From: Hugh Dickins Date: Tue, 29 May 2012 22:06:38 +0000 (-0700) Subject: tmpfs: enable NOSEC optimization X-Git-Tag: v3.5-rc1~49^2~132 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=2f6e38f3cd17a7858112f538c1700c747170db1f;p=~emulex%2Finfiniband.git tmpfs: enable NOSEC optimization Let tmpfs into the NOSEC optimization (avoiding file_remove_suid() overhead on most common writes): set MS_NOSEC on its superblocks. Signed-off-by: Hugh Dickins Cc: Christoph Hellwig Cc: Andi Kleen Cc: Al Viro Cc: Cong Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/shmem.c b/mm/shmem.c index db72d8e44ec..fe5ae6962ab 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2373,6 +2373,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) } } sb->s_export_op = &shmem_export_ops; + sb->s_flags |= MS_NOSEC; #else sb->s_flags |= MS_NOUSER; #endif