Skip to contentSkip to conversation

VFS: collect_mounts() should return an ERR_PTR

PATCH New Dan Carpenter 1 participant 1 message Aug 14, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

fs/namespace.c +1 -1
index 9809084..f1c61bb 100644
@@ -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;
 }