From: Jan Blunck <jblunck@suse.de>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
hch@lst.de, tiwai@suse.de
Subject: Re: [patch] Combine path_put and path_put_conditional
Date: Sat, 29 Sep 2007 14:36:13 +0200 [thread overview]
Message-ID: <20070929123613.GU5696@hasse.suse.de> (raw)
In-Reply-To: <200709282243.51243.agruen@suse.de>
On Fri, Sep 28, Andreas Gruenbacher wrote:
> The name path_put_conditional (formerly, dput_path) is a little unclear.
> Replace (path_put_conditional + path_put) with path_walk_put_both,
> "put a pair of paths after a path_walk" (see the kerneldoc).
Hmm, I don't know. To put both the nd and path is at the moment only used in
some error paths. I have another series of patches pending which is using
path_put_conditional outside of error paths. So please don't remove
it. Besides that the naming completely hides that the conditional release of
the vfsmount reference. Besides that I would name it path_put_both() just to
make it more "beautiful" wrt the other path_put*() functions.
> @@ -996,8 +1006,8 @@ return_reval:
> return_base:
> return 0;
> out_dput:
> - path_put_conditional(&next, nd);
> - break;
> + path_walk_put_both(&next, &nd->path);
> + goto return_err;
> }
> path_put(&nd->path);
> return_err:
> @@ -1777,11 +1787,15 @@ ok:
> return 0;
>
> exit_dput:
> - path_put_conditional(&path, nd);
> + path_walk_put_both(&path, &nd->path);
> + goto exit_intent;
> +
> exit:
> + path_put(&nd->path);
> +
> +exit_intent:
> if (!IS_ERR(nd->intent.open.file))
> release_open_intent(nd);
> - path_put(&nd->path);
> return error;
>
> do_link:
IMHO introducing another label just to use it here isn't worth the change.
next prev parent reply other threads:[~2007-09-29 12:36 UTC|newest]
Thread overview: 32+ 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
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 [this message]
2007-09-29 22:21 ` Ingo Oeser
2007-10-09 9:16 ` [patch 00/10] Use struct path in struct nameidata Christoph Hellwig
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=20070929123613.GU5696@hasse.suse.de \
--to=jblunck@suse.de \
--cc=agruen@suse.de \
--cc=hch@lst.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