Skip to content

Commit e0f7e2b

Browse files
mjkravetztorvalds
authored andcommitted
hugetlbfs: fix mount mode command line processing
In commit 3202198 ("hugetlbfs: Convert to fs_context") processing of the mount mode string was changed from match_octal() to fsparam_u32. This changed existing behavior as match_octal does not require octal values to have a '0' prefix, but fsparam_u32 does. Use fsparam_u32oct which provides the same behavior as match_octal. Link: https://lkml.kernel.org/r/20210721183326.102716-1-mike.kravetz@oracle.com Fixes: 3202198 ("hugetlbfs: Convert to fs_context") Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Reported-by: Dennis Camera <bugs+kernel.org@dtnr.ch> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: David Howells <dhowells@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e4dc348 commit e0f7e2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/hugetlbfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ enum hugetlb_param {
7777
static const struct fs_parameter_spec hugetlb_fs_parameters[] = {
7878
fsparam_u32 ("gid", Opt_gid),
7979
fsparam_string("min_size", Opt_min_size),
80-
fsparam_u32 ("mode", Opt_mode),
80+
fsparam_u32oct("mode", Opt_mode),
8181
fsparam_string("nr_inodes", Opt_nr_inodes),
8282
fsparam_string("pagesize", Opt_pagesize),
8383
fsparam_string("size", Opt_size),

0 commit comments

Comments
 (0)