All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] hugetlbfs: fix the hugetlbfs can not be mounted
@ 2016-10-29  6:08 ` zhongjiang
  0 siblings, 0 replies; 10+ messages in thread
From: zhongjiang @ 2016-10-29  6:08 UTC (permalink / raw)
  To: nyc, n-horiguchi, mike.kravetz, rientjes, hillf.zj, akpm
  Cc: linux-kernel, linux-mm

From: zhong jiang <zhongjiang@huawei.com>

Since 'commit 3e89e1c5ea84 ("hugetlb: make mm and fs code explicitly non-modular")'
bring in the mainline. mount hugetlbfs will result in the following issue.

mount: unknown filesystme type 'hugetlbfs'

because previous patch remove the module_alias_fs, when we mount the fs type,
the caller get_fs_type can not find the filesystem.

The patch just recover the module_alias_fs to identify the hugetlbfs.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 fs/hugetlbfs/inode.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 4fb7b10..b63e7de 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -35,6 +35,7 @@
 #include <linux/security.h>
 #include <linux/magic.h>
 #include <linux/migrate.h>
+#include <linux/module.h>
 #include <linux/uio.h>
 
 #include <asm/uaccess.h>
@@ -1209,6 +1210,7 @@ static struct dentry *hugetlbfs_mount(struct file_system_type *fs_type,
 	.mount		= hugetlbfs_mount,
 	.kill_sb	= kill_litter_super,
 };
+MODULE_ALIAS_FS("hugetlbfs");
 
 static struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-11-04  2:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-29  6:08 [RFC PATCH] hugetlbfs: fix the hugetlbfs can not be mounted zhongjiang
2016-10-29  6:08 ` zhongjiang
2016-10-29  7:38 ` zhong jiang
2016-10-29  7:38   ` zhong jiang
2016-11-03 19:17 ` Andrew Morton
2016-11-03 19:17   ` Andrew Morton
2016-11-03 20:54   ` Paul Gortmaker
2016-11-03 20:54     ` Paul Gortmaker
2016-11-04  2:22   ` zhong jiang
2016-11-04  2:22     ` zhong jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.