On Fri, 14 Jan 2011 20:52:41 +0300 Pavel Shilovsky <piastryyy@xxxxxxxxx> wrote: > When we get oplock break notification we should set the appropriate > value of OplockLevel field in oplock break acknowledge according to > the oplock level held by the client in this time. As we only can have > level II oplock or no oplock in the case of oplock break, we should be > aware only about clientCanCacheRead field in cifsInodeInfo structure. > > Also fix bug connected with wrong interpretation of OplockLevel field > during oplock break notification processing. > > Signed-off-by: Pavel Shilovsky <piastryyy@xxxxxxxxx> > Cc: <stable@xxxxxxxxxx> [...] > @@ -2192,7 +2192,8 @@ void cifs_oplock_break(struct work_struct *work) > */ > if (!cfile->oplock_break_cancelled) { > rc = CIFSSMBLock(0, tlink_tcon(cfile->tlink), cfile->netfid, 0, > - 0, 0, 0, LOCKING_ANDX_OPLOCK_RELEASE, false); > + 0, 0, 0, LOCKING_ANDX_OPLOCK_RELEASE, false, > + cinode->clientCanCacheRead); ^^^^^^^^^^^ This looks wrong. clientCanCacheRead is a bool, but that parm is a __u8. That might get turned into "1" by most compilers, but I'd probably not count on that. > cFYI(1, "Oplock release rc = %d", rc); > } > -- Jeff Layton <jlayton@xxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html