aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2012-05-29 15:06:38 -0700
committerLinus Torvalds <[email protected]>2012-05-29 16:22:22 -0700
commit2f6e38f3cd17a7858112f538c1700c747170db1f (patch)
tree894181551acd46caea34ff2b3fba13ffd049fcbd
parentbde05d1ccd512696b09db9dd2e5f33ad19152605 (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 <[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]>
-rw-r--r--mm/shmem.c1
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)
}
}
sb->s_export_op = &shmem_export_ops;
+ sb->s_flags |= MS_NOSEC;
#else
sb->s_flags |= MS_NOUSER;
#endif