diff mbox

hugetlbfs: Fix an error code in init_hugetlbfs_fs()

Message ID 20180620110921.2s4krw4zjbnfniq5@kili.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter June 20, 2018, 11:09 a.m. UTC
We accidentally deleted the error code assignment.

Fixes: 9b82d88c136c ("hugetlbfs: Convert to fs_context")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Mike Kravetz June 20, 2018, 3:25 p.m. UTC | #1
On 06/20/2018 04:09 AM, Dan Carpenter wrote:
> We accidentally deleted the error code assignment.
> 
> Fixes: 9b82d88c136c ("hugetlbfs: Convert to fs_context")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks for catching this,
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
David Howells June 22, 2018, 11:15 a.m. UTC | #2
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> We accidentally deleted the error code assignment.

Thanks.  I'll fold it into the original patch.

David
diff mbox

Patch

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 9a5c9fcf54f5..91fadca3c8e6 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -1482,8 +1482,10 @@  static int __init init_hugetlbfs_fs(void)
 	i = 0;
 	for_each_hstate(h) {
 		mnt = mount_one_hugetlbfs(h);
-		if (IS_ERR(mnt) && i == 0)
+		if (IS_ERR(mnt) && i == 0) {
+			error = PTR_ERR(mnt);
 			goto out;
+		}
 		hugetlbfs_vfsmount[i] = mnt;
 		i++;
 	}