All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Howells <dhowells@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] VFS: copy_tree() returns an error pointer now
Date: Wed, 04 Jul 2012 07:39:45 +0000	[thread overview]
Message-ID: <20120704073945.GA30520@elgon.mountain> (raw)

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 <dan.carpenter@oracle.com>

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)

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Howells <dhowells@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] VFS: copy_tree() returns an error pointer now
Date: Wed, 4 Jul 2012 10:39:45 +0300	[thread overview]
Message-ID: <20120704073945.GA30520@elgon.mountain> (raw)

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 <dan.carpenter@oracle.com>

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)

             reply	other threads:[~2012-07-04  7:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04  7:39 Dan Carpenter [this message]
2012-07-04  7:39 ` [patch] VFS: copy_tree() returns an error pointer now Dan Carpenter
2012-07-04  9:45 ` David Howells
2012-07-04  9:45   ` David Howells
2012-07-14 12:10 ` Al Viro
2012-07-14 12:10   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120704073945.GA30520@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=dhowells@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.