From: Miklos Szeredi Add a .show_options super operation to hugetlbfs. Use generic_show_options() and save the complete option string in hugetlbfs_fill_super(). Signed-off-by: Miklos Szeredi Cc: Adam Litke Cc: Badari Pulavarty Cc: Ken Chen Cc: William Lee Irwin III Cc: David Gibson Signed-off-by: Andrew Morton --- fs/hugetlbfs/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN fs/hugetlbfs/inode.c~mount-options-fix-hugetlbfs fs/hugetlbfs/inode.c --- a/fs/hugetlbfs/inode.c~mount-options-fix-hugetlbfs +++ a/fs/hugetlbfs/inode.c @@ -734,6 +734,7 @@ static const struct super_operations hug .delete_inode = hugetlbfs_delete_inode, .drop_inode = hugetlbfs_drop_inode, .put_super = hugetlbfs_put_super, + .show_options = generic_show_options, }; static int @@ -817,6 +818,8 @@ hugetlbfs_fill_super(struct super_block struct hugetlbfs_config config; struct hugetlbfs_sb_info *sbinfo; + save_mount_options(sb, data); + config.nr_blocks = -1; /* No limit on size by default */ config.nr_inodes = -1; /* No limit on number of inodes by default */ config.uid = current->fsuid; _