Re: [PATCH 4/5] cifs: take reference to inode for oplock breaks

Steve French <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Fri, Aug 21, 2009 at 5:36 AM, Jeff Layton <[email protected]> wrote:

> On Thu, 20 Aug 2009 19:42:42 -0500
> Steve French <[email protected]> wrote:
>
> > Why don't we have a reference to this inode already?   We can't have an
> > oplock break unless the file is open, if the file is open then we have a
> > reference to the inode ...
> >
>
> Well, you have a reference when the entry goes onto the list. There's
> no guarantee that you'll still have one when cifs_oplock_thread goes to
> take it off the list however. The file could have been closed by then
>

An oplock response is handle based so we need to make sure the fid
is valid (if not, throw away the oplock response, except for the case
of batch oplock which we don't use yet).  Seems odd to lock the
inode when we really need the fid (file struct)

We could mark the file struct (similar to the write pending flag) and
delete such an entry off the oplockq in close (if we are closing
a file with an oplock pending)



-- 
Thanks,

Steve

_______________________________________________
linux-cifs-client mailing list
[email protected]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.