summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-14 12:44:39 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2013-08-24 12:10:29 -0400
commit52e220d357a38cb29fa2e29f34ed94c1d66357f4 (patch)
tree33027a6684f4746885db8149a79af09c0edd39d3 /fs/namespace.c
parent821ff77c6c524c40667e01483fc72428b58810b4 (diff)
downloadlwn-52e220d357a38cb29fa2e29f34ed94c1d66357f4.tar.gz
lwn-52e220d357a38cb29fa2e29f34ed94c1d66357f4.zip
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. [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] Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 7b1ca9ba0b0a..a45ba4f267fe 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -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;
}