Skip to contentSkip to conversation

VFS: copy_tree() returns an error pointer now

PATCH In review Dan Carpenter 3 participants 3 messages Jul 4, 2012 – Jul 14, 2012

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

PATCH 1/1 VFS: copy_tree() returns an error pointer now

We recently changed copy_tree() to return an error pointer in d196d8d327 ('VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors'). This call needs to be updated as well.

fs/namespace.c +3 -1
index 8583bfe..c53d338 100644
@@ -1314,7 +1314,9 @@ struct vfsmount *collect_mounts(struct path *path)
 	tree = copy_tree(real_mount(path->mnt), path->dentry,
 			 CL_COPY_ALL | CL_PRIVATE);
 	up_write(&namespace_sem);
-	return tree ? &tree->mnt : NULL;
+	if (IS_ERR(tree))
+		return NULL;
+	return &tree->mnt;
 }
 
 void drop_collected_mounts(struct vfsmount *mnt)
maintainer
#2 lore raw
In reply to Dan Carpenter
Quoted 3 lines · Dan Carpenter

We recently changed copy_tree() to return an error pointer in d196d8d327 ('VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors'). This call needs to be updated as well.

Folded.