From patchwork Thu Dec 6 18:07:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 1846191 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BF405DF2F9 for ; Thu, 6 Dec 2012 18:08:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603Ab2LFSII (ORCPT ); Thu, 6 Dec 2012 13:08:08 -0500 Received: from mail-lb0-f174.google.com ([209.85.217.174]:56371 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754707Ab2LFSIH (ORCPT ); Thu, 6 Dec 2012 13:08:07 -0500 Received: by mail-lb0-f174.google.com with SMTP id gi11so5572133lbb.19 for ; Thu, 06 Dec 2012 10:08:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=pBC2jckTkihtG796KbJUSCoavSYR9OMt1CqG+cOfdcI=; b=XDnpG7RVBOYN4MP+P1Lehd5P7dtI210cefdwPTz+Xlz6pNCW6y6PO4e2U6g9CBtC/q GFJfhFG8oeD1QaYguZcZi7aGrbALwgUPTeMQNY52tvY6VVJkBnZlK4ppmLD/+K9Edl3c m4A6vzTXLpF81Kk5gMKzFimTKRPE2VrvtrhcTcIuzwxSEBWx0sGcSvYKFHv70eBlRCfp DHakwKXYeOxPabH4dtL7uJXldnKh+VWPu1mDVBGytp/mNgqsyZ3zNvWE+S1bbHphQVI9 Fuu0RUbCXZ5kjELKt0/4CMKnfz1VDCMNlLpzWuDgbtrIz8bTHudKt078fhYeTW86GYlz ZF7A== Received: by 10.152.124.83 with SMTP id mg19mr2712712lab.6.1354817286815; Thu, 06 Dec 2012 10:08:06 -0800 (PST) Received: from localhost.localdomain ([79.126.69.151]) by mx.google.com with ESMTPS id gr12sm3731695lab.3.2012.12.06.10.08.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 10:08:05 -0800 (PST) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH] CIFS: Fix possible data coherency problem after oplock break to None Date: Thu, 6 Dec 2012 22:07:53 +0400 Message-Id: <1354817274-7701-2-git-send-email-piastry@etersoft.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1354817274-7701-1-git-send-email-piastry@etersoft.ru> References: <1354817274-7701-1-git-send-email-piastry@etersoft.ru> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org 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 Reviewed-by: Jeff Layton --- 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); }