VFS: collect_mounts() should return an ERR_PTR
Subsystems (2)
PATCH 1/1 VFS: collect_mounts() should return an ERR_PTR
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.
Cc <[email protected]> # 3.10+
Signed-off-by Dan Carpenter <[email protected]>
fs/namespace.c +1 -1
@@ -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; }