1 From 5920eef9d34dbc1812b321eb0d086e32c67fd4ed Mon Sep 17 00:00:00 2001
2 From: Ian Kent <raven@themaw.net>
3 Date: Fri, 1 Feb 2019 14:21:29 -0800
4 Subject: autofs: fix error return in autofs_fill_super()
6 [ Upstream commit f585b283e3f025754c45bbe7533fc6e5c4643700 ]
8 In autofs_fill_super() on error of get inode/make root dentry the return
9 should be ENOMEM as this is the only failure case of the called
12 Link: http://lkml.kernel.org/r/154725123240.11260.796773942606871359.stgit@pluto-themaw-net
13 Signed-off-by: Ian Kent <raven@themaw.net>
14 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 Signed-off-by: Sasha Levin <sashal@kernel.org>
18 fs/autofs/inode.c | 4 +++-
19 1 file changed, 3 insertions(+), 1 deletion(-)
21 diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
22 index 846c052569dd..3c14a8e45ffb 100644
23 --- a/fs/autofs/inode.c
24 +++ b/fs/autofs/inode.c
25 @@ -255,8 +255,10 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
27 root_inode = autofs_get_inode(s, S_IFDIR | 0755);
28 root = d_make_root(root_inode);