Re: [PATCH] CIFS: Fix possible data coherency problem after oplock break to None

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

 



On Thu,  6 Dec 2012 22:07:53 +0400
Pavel Shilovsky <piastry@xxxxxxxxxxx> wrote:

> by using cifs_invalidate_mapping rather than invalidate_remote_inode
> in cifs_oplock_break - this invalidates all inode pages and resets
> fscache cookies.
> 
> Signed-off-by: Pavel Shilovsky <piastry@xxxxxxxxxxx>
> ---
>  fs/cifs/file.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 84860f1..8fb3df2 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -3592,7 +3592,7 @@ void cifs_oplock_break(struct work_struct *work)
>  		if (cinode->clientCanCacheRead == 0) {
>  			rc = filemap_fdatawait(inode->i_mapping);
>  			mapping_set_error(inode->i_mapping, rc);
> -			invalidate_remote_inode(inode);
> +			cifs_invalidate_mapping(inode);
>  		}
>  		cFYI(1, "Oplock flush inode %p rc %d", inode, rc);
>  	}

That does look better...

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
--
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


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux