[lkml]   [2007]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-09-29 11:29    [W:0.138 / U:6.212 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site