Skip to content

Commit 2f6e38f

Browse files
Hugh Dickinstorvalds
authored andcommitted
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>
1 parent bde05d1 commit 2f6e38f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mm/shmem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,6 +2373,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
23732373
}
23742374
}
23752375
sb->s_export_op = &shmem_export_ops;
2376+
sb->s_flags |= MS_NOSEC;
23762377
#else
23772378
sb->s_flags |= MS_NOUSER;
23782379
#endif

0 commit comments

Comments
 (0)