Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92927890 authored by Ian Kent's avatar Ian Kent Committed by Greg Kroah-Hartman
Browse files

autofs: fix error return in autofs_fill_super()

[ Upstream commit f585b283e3f025754c45bbe7533fc6e5c4643700 ]

In autofs_fill_super() on error of get inode/make root dentry the return
should be ENOMEM as this is the only failure case of the called
functions.

Link: http://lkml.kernel.org/r/154725123240.11260.796773942606871359.stgit@pluto-themaw-net


Signed-off-by: default avatarIan Kent <raven@themaw.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1efb234e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -255,8 +255,10 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
	}
	root_inode = autofs_get_inode(s, S_IFDIR | 0755);
	root = d_make_root(root_inode);
	if (!root)
	if (!root) {
		ret = -ENOMEM;
		goto fail_ino;
	}
	pipe = NULL;

	root->d_fsdata = ino;