tmpfs: enable NOSEC optimization
authorHugh Dickins <[email protected]>
Tue, 29 May 2012 22:06:38 +0000 (15:06 -0700)
committerLinus Torvalds <[email protected]>
Tue, 29 May 2012 23:22:22 +0000 (16:22 -0700)
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 <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Cong Wang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/shmem.c

index db72d8e44ec62d3d7871deb22c5bef24b5a86866..fe5ae6962ab347a9d0f79482fae89b25f78659e1 100644 (file)
@@ -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