mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
VFS: collect_mounts() should return an ERR_PTR
commit 52e220d357 upstream.
This should actually be returning an ERR_PTR on error instead of NULL.
That was how it was designed and all the callers expect it.
[AV: actually, that's what "VFS: Make clone_mnt()/copy_tree()/collect_mounts()
return errors" missed - originally collect_mounts() was expected to return
NULL on failure]
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b169395145
commit
2bee1e0f28
|
|
@ -1429,7 +1429,7 @@ struct vfsmount *collect_mounts(struct path *path)
|
|||
CL_COPY_ALL | CL_PRIVATE);
|
||||
namespace_unlock();
|
||||
if (IS_ERR(tree))
|
||||
return NULL;
|
||||
return ERR_CAST(tree);
|
||||
return &tree->mnt;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user