lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070929092557.GB25343@lst.de>
Date:	Sat, 29 Sep 2007 11:25:57 +0200
From:	Christoph Hellwig <hch@....de>
To:	Andreas Gruenbacher <agruen@...e.de>
Cc:	jblunck@...e.de, linux-kernel@...r.kernel.org,
	viro@...iv.linux.org.uk, hch@....de, tiwai@...e.de
Subject: Re: [patch] Combine path_put and path_put_conditional

On Fri, Sep 28, 2007 at 10:43:50PM +0200, Andreas Gruenbacher wrote:
> Here is another cleanup on top of Jan's set. Comments?
> 
> 
> 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).

I think this function is a good idea.  The name seems odd to me, but
I don't really have a better idea either.

> +static void path_walk_put_both(struct path *path1, struct path *path2)
> +{
> +	dput(path1->dentry);
> +	dput(path2->dentry);
> +	mntput(path1->mnt);
> +	if (path1->mnt != path2->mnt)
> +		mntput(path2->mnt);
>  }

Why do you opencode the path_put for path1?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ