Re: [PATCH v1 012/104] NFSd: Clean up helper __release_lock_stateid

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

 



On Tue, 24 Jun 2014 04:53:36 -0700
Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> On Thu, Jun 19, 2014 at 10:49:18AM -0400, Jeff Layton wrote:
> > From: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
> > 
> > Use filp_close() instead of open coding
> 
> filp_close does more than what's currently opencoded here:
> 
>  - file_count debug check which seems pointless but harmless
>  - calling ->flush. This doesn't do much on nfs exportable filesystem
>    except for exofs, which does dumb shit in it that should be removed,
>    but the maintainer refuse.
>  - call into dnotify, which we probably should be doing here.
> 

Yeah. It is a small change in behavior but seems like the right thing
to do. I'll flesh out the commit message to spell that out though.

> > -static void __release_lock_stateid(struct nfs4_ol_stateid *stp)
> > +static void __release_lock_stateid(struct nfs4_lockowner *lo,
> > +		struct nfs4_ol_stateid *stp)
> 
> But what's the point of explicitly passing the lock owner instead of
> deriving it?
> 

I thought that was a little silly too, but didn't care enough to change
it. I can only assume that Trond figured that the callers all needed to
know what the lockowner was so you wouldn't need to do two lockowner()
calls. Still, those are just container_of(), so I don't see the point
in avoiding them either. I'll change it not to pass the owner.

Thanks,
-- 
Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
--
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