Commit f585b283 authored by Ian Kent's avatar Ian Kent Committed by Linus Torvalds

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-netSigned-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>
parent 63ce5f55
...@@ -266,8 +266,10 @@ int autofs_fill_super(struct super_block *s, void *data, int silent) ...@@ -266,8 +266,10 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
} }
root_inode = autofs_get_inode(s, S_IFDIR | 0755); root_inode = autofs_get_inode(s, S_IFDIR | 0755);
root = d_make_root(root_inode); root = d_make_root(root_inode);
if (!root) if (!root) {
ret = -ENOMEM;
goto fail_ino; goto fail_ino;
}
pipe = NULL; pipe = NULL;
root->d_fsdata = ino; root->d_fsdata = ino;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment