diff options
author | Hugh Dickins <hughd@google.com> | 2012-05-29 18:06:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:22 -0400 |
commit | 2f6e38f3cd17a7858112f538c1700c747170db1f (patch) | |
tree | 894181551acd46caea34ff2b3fba13ffd049fcbd /mm/shmem.c | |
parent | bde05d1ccd512696b09db9dd2e5f33ad19152605 (diff) |
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 <hughd@google.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index db72d8e44ec6..fe5ae6962ab3 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) | |||
2373 | } | 2373 | } |
2374 | } | 2374 | } |
2375 | sb->s_export_op = &shmem_export_ops; | 2375 | sb->s_export_op = &shmem_export_ops; |
2376 | sb->s_flags |= MS_NOSEC; | ||
2376 | #else | 2377 | #else |
2377 | sb->s_flags |= MS_NOUSER; | 2378 | sb->s_flags |= MS_NOUSER; |
2378 | #endif | 2379 | #endif |