linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] VFS: collect_mounts() should return an ERR_PTR
@ 2013-08-14  9:44 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-08-14  9:44 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, kernel-janitors

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: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/namespace.c b/fs/namespace.c
index 9809084..f1c61bb 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;
 }
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-14  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14  9:44 [patch] VFS: collect_mounts() should return an ERR_PTR Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).