From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932197AbcJ2Hov (ORCPT ); Sat, 29 Oct 2016 03:44:51 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:38421 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbcJ2Hos (ORCPT ); Sat, 29 Oct 2016 03:44:48 -0400 Message-ID: <581451E7.1040004@huawei.com> Date: Sat, 29 Oct 2016 15:38:15 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: , , , , , CC: , Subject: Re: [RFC PATCH] hugetlbfs: fix the hugetlbfs can not be mounted References: <1477721311-54522-1-git-send-email-zhongjiang@huawei.com> In-Reply-To: <1477721311-54522-1-git-send-email-zhongjiang@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/10/29 14:08, zhongjiang wrote: > From: zhong jiang > > 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 > --- > 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 > #include > #include > +#include > #include > > #include > @@ -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]; > please ignore the patch, It have been fixed.