From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [patch] VFS: copy_tree() returns an error pointer now Date: Wed, 4 Jul 2012 10:39:45 +0300 Message-ID: <20120704073945.GA30520@elgon.mountain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org To: David Howells Return-path: Received: from rcsinet15.oracle.com ([148.87.113.117]:20715 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932986Ab2GDHjy (ORCPT ); Wed, 4 Jul 2012 03:39:54 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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. Signed-off-by: Dan Carpenter diff --git a/fs/namespace.c b/fs/namespace.c index 8583bfe..c53d338 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -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)