Skip to content

Commit f585b28

Browse files
raven-autorvalds
authored andcommitted
autofs: fix error return in autofs_fill_super()
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: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 63ce5f5 commit f585b28

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/autofs/inode.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
266266
}
267267
root_inode = autofs_get_inode(s, S_IFDIR | 0755);
268268
root = d_make_root(root_inode);
269-
if (!root)
269+
if (!root) {
270+
ret = -ENOMEM;
270271
goto fail_ino;
272+
}
271273
pipe = NULL;
272274

273275
root->d_fsdata = ino;

0 commit comments

Comments
 (0)