lkml.org 
[lkml]   [2007]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 08/10] Introduce path_get()
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?

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

\
 
 \ /
  Last update: 2007-09-28 20:43    [W:0.141 / U:35.676 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site