From: Christoph Hellwig <hch@lst.de>
To: jblunck@suse.de
Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
hch@lst.de, agruen@suse.de, tiwai@suse.de
Subject: Re: [patch 08/10] Introduce path_get()
Date: Fri, 28 Sep 2007 20:40:03 +0200 [thread overview]
Message-ID: <20070928184003.GH14269@lst.de> (raw)
In-Reply-To: <20070927141228.805874619@X40.localnet>
On Thu, Sep 27, 2007 at 04:12:08PM +0200, jblunck@suse.de wrote:
> This introduces the symmetric function to path_put() for getting a reference
> to the dentry and vfsmount of a struct path in the right order.
Looks good in general,
> /**
> + * path_get - get a reference to a path
> + * @path: path to get the reference to
> + *
> + * Given a path increment the reference count to the dentry and the vfsmount.
> + */
> +struct path *path_get(struct path *path)
> +{
> + mntget(path->mnt);
> + dget(path->dentry);
> + return path;
> +}
but the calling convention is rather odd, because the only thing callers
might do with this is to dereference and then assign it. Maybe this
should just return void to make it more clear what's going on?
next prev parent reply other threads:[~2007-09-28 18:40 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 14:12 [patch 00/10] Use struct path in struct nameidata jblunck
2007-09-27 14:12 ` [patch 01/10] Dont touch fs_struct in drivers jblunck
2007-09-28 18:33 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 02/10] Dont touch fs_struct in usermodehelper jblunck
2007-09-27 17:46 ` Greg KH
2007-09-27 20:39 ` Christoph Hellwig
2007-09-27 21:36 ` Greg KH
2007-09-28 18:33 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 03/10] Remove path_release_on_umount() jblunck
2007-09-28 18:34 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 04/10] Move struct path into its own header jblunck
2007-09-28 18:35 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 05/10] Embed a struct path into struct nameidata instead of nd->{dentry,mnt} jblunck
2007-09-28 18:36 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 06/10] Introduce path_put() jblunck
2007-09-28 18:37 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 07/10] Use path_put() in a few places instead of {mnt,d}put() jblunck
2007-09-28 18:37 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 08/10] Introduce path_get() jblunck
2007-09-28 18:40 ` Christoph Hellwig [this message]
2007-09-27 14:12 ` [patch 09/10] Use struct path in fs_struct jblunck
2007-09-28 18:42 ` Christoph Hellwig
2007-09-28 20:39 ` Andreas Gruenbacher
2007-09-29 9:24 ` Christoph Hellwig
2007-09-29 9:31 ` Christoph Hellwig
2007-09-27 14:12 ` [patch 10/10] Make set_fs_{root,pwd} take a struct path jblunck
2007-09-28 18:42 ` Christoph Hellwig
2007-09-28 20:43 ` [patch] Combine path_put and path_put_conditional Andreas Gruenbacher
2007-09-29 9:25 ` Christoph Hellwig
2007-09-29 12:36 ` Jan Blunck
2007-09-29 22:21 ` Ingo Oeser
2007-10-09 9:16 ` [patch 00/10] Use struct path in struct nameidata Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2007-10-09 18:05 Jan Blunck
2007-10-09 18:05 ` [patch 08/10] Introduce path_get() Jan Blunck
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=20070928184003.GH14269@lst.de \
--to=hch@lst.de \
--cc=agruen@suse.de \
--cc=jblunck@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox