[linux-cifs-client] [PATCH 4/5] cifs: take reference to inode for oplock breaks

Steve French smfrench at gmail.com
Fri Aug 21 09:18:16 MDT 2009


On Fri, Aug 21, 2009 at 5:36 AM, Jeff Layton <jlayton at redhat.com> wrote:

> On Thu, 20 Aug 2009 19:42:42 -0500
> Steve French <smfrench at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/linux-cifs-client/attachments/20090821/2104872b/attachment.html>


More information about the linux-cifs-client mailing list