]> Git Repo - linux.git/commitdiff
VFS: collect_mounts() should return an ERR_PTR
authorDan Carpenter <[email protected]>
Wed, 14 Aug 2013 09:44:39 +0000 (12:44 +0300)
committerAl Viro <[email protected]>
Sat, 24 Aug 2013 16:10:29 +0000 (12:10 -0400)
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: <[email protected]> # 3.10+
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Al Viro <[email protected]>
fs/namespace.c

index 7b1ca9ba0b0a70213915f6d7bce688184ab7a56f..a45ba4f267fe6e834909f122dd166cdd608dcce5 100644 (file)
@@ -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;
 }
 
This page took 0.065955 seconds and 4 git commands to generate.