lkml.org 
[lkml]   [2019]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference
On Thu, Sep 05, 2019 at 03:48:55PM -0400, Vivek Goyal wrote:
> diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
> index 85e2dcad68c1..04e2c000d63f 100644
> --- a/fs/fuse/fuse_i.h
> +++ b/fs/fuse/fuse_i.h
> @@ -479,6 +479,11 @@ struct fuse_iqueue_ops {
> */
> void (*wake_pending_and_unlock)(struct fuse_iqueue *fiq)
> __releases(fiq->waitq.lock);
> +
> + /**
> + * Put a reference on fiq_priv.

I'm a bit confused about fiq->priv's role in this. The callback takes
struct fuse_iqueue *fiq as the argument, not void *priv, so it could
theoretically do more than just release priv.

I think one of the following would be clearer:

/**
* Drop a reference to fiq->priv.
*/
void (*put_priv)(void *priv);

Or:

/**
* Clean up when fuse_iqueue is destroyed.
*/
void (*release)(struct fuse_iqueue *fiq);

In the second case fuse_conn_put() shouldn't check fiq->priv.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-09-06 14:01    [W:0.162 / U:18.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site