Skip to content

Commit

Permalink
tmpfs: enable NOSEC optimization
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Hugh Dickins authored and torvalds committed May 29, 2012
1 parent bde05d1 commit 2f6e38f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f6e38f

Please sign in to comment.