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: <20070928184003.GH14269@lst.de>
Date:	Fri, 28 Sep 2007 20:40:03 +0200
From:	Christoph Hellwig <hch@....de>
To:	jblunck@...e.de
Cc:	linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk, hch@....de,
	agruen@...e.de, tiwai@...e.de
Subject: Re: [patch 08/10] Introduce path_get()

On Thu, Sep 27, 2007 at 04:12:08PM +0200, jblunck@...e.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?

-
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