提交 2f6e38f3 编写于 作者: H Hugh Dickins 提交者: Linus Torvalds

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: NHugh 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 bde05d1c
...@@ -2373,6 +2373,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) ...@@ -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_export_op = &shmem_export_ops;
sb->s_flags |= MS_NOSEC;
#else #else
sb->s_flags |= MS_NOUSER; sb->s_flags |= MS_NOUSER;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册