Re: [PATCH 06/10] locks: plumb an "aux" pointer into the setlease routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 24, 2014 at 06:08:01AM -0400, Jeff Layton wrote:
> > Can you just return -EEXIST if reusing an existing one and make it a
> > normal private pointer a we use elsewhere?
> > 
> 
> That sounds a little confusing...
> 
> We have two pointers we pass down to generic_setlease: the file_lock
> itself and with this patch, the "aux" pointer. We can end up using
> either, neither or both during a call to generic_setlease.
> 
> A simple error code can't properly indicate which of the two pointers
> got used. It might be clearer to turn the file_lock into a normal
> pointer and return -EEXIST if we reused it, but leave aux as a double
> pointer.

There is no way we could use a new file_lock but an existing
fasync_struct, as there won't be one on the newly allocated file_lock
structure, but otherwise you're right.

Just rename it to priv then and make me a little less grumpy ;-)

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux