On Fri, 14 Jan 2011 20:52:41 +0300
Pavel Shilovsky <[email protected]> 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 <[email protected]>
> Cc: <[email protected]>

[...]

> @@ -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 <[email protected]>

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to