From: Ken Chen Date: Tue, 5 Feb 2008 06:28:36 +0000 (-0800) Subject: hugetlb: allow sticky directory mount option X-Git-Tag: v2.6.25-rc1~979 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75897d60a54ccee94253312107f941a83b5077cb;p=linux-2.6 hugetlb: allow sticky directory mount option Allow sticky directory mount option for hugetlbfs. This allows admin to create a shared hugetlbfs mount point for multiple users, while prevent accidental file deletion that users may step on each other. It is similiar to default tmpfs mount option, or typical option used on /tmp. Signed-off-by: Ken Chen Cc: Badari Pulavarty Cc: Adam Litke Cc: David Gibson Cc: William Lee Irwin III Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 09ee07f026..3b3cc28cde 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -768,7 +768,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) case Opt_mode: if (match_octal(&args[0], &option)) goto bad_val; - pconfig->mode = option & 0777U; + pconfig->mode = option & 01777U; break; case Opt_size: {