From patchwork Tue Mar 15 22:27:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 637971 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2FMRufp025089 for ; Tue, 15 Mar 2011 22:27:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272Ab1COW14 (ORCPT ); Tue, 15 Mar 2011 18:27:56 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:34658 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753114Ab1COW1z (ORCPT ); Tue, 15 Mar 2011 18:27:55 -0400 Received: by fxm17 with SMTP id 17so1108498fxm.19 for ; Tue, 15 Mar 2011 15:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:date:message-id:x-mailer; bh=1faK8OIQ+Fkhy5N10ShHI1F8Lm4B2pZqlnWMdMIvpk8=; b=K78D/DIp70e/ZSqGAIW/SHz3ha9XnFfsTu01guM8RP9wvpDExtbHY2OOzA2j5Tu3ab WUaUqLW8+ENx0dztQYbP/oYpRu+8RFu6u4sl173dzGJW5je7EWoAAqq1066db+Oe+Qti TkpdnCi3q6MPZMzB2ArcVMT2+x4AI1PYrfPMk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer; b=w6s3T9e+Mxm69186efouq9DAKui4XFAYEFeqHEd61IJrdprWr+YcYurBomhoo56GmT qV/Rng6MKx8gTVnlAJOUxof9+mLuC0A9Zti1m1wDtyp7ZvO1OHhPQMKQLBbvOqsZxl7A wrPIMrUlBlstCr+RCuXfrn93M1XZRM6OybKMs= Received: by 10.223.85.136 with SMTP id o8mr53664fal.124.1300228074512; Tue, 15 Mar 2011 15:27:54 -0700 (PDT) Received: from localhost.localdomain ([95.84.12.86]) by mx.google.com with ESMTPS id r24sm168417fax.3.2011.03.15.15.27.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 15:27:54 -0700 (PDT) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH] CIFS: Use invalidate_inode_pages2 instead of invalidate_remote_inode (try #3) Date: Wed, 16 Mar 2011 01:27:14 +0300 Message-Id: <1300228034-4123-1-git-send-email-piastry@etersoft.ru> X-Mailer: git-send-email 1.7.1 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 15 Mar 2011 22:27:56 +0000 (UTC) diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 41e5651..adb6324 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1691,12 +1691,18 @@ cifs_invalidate_mapping(struct inode *inode) cifs_i->invalid_mapping = false; - /* write back any cached data */ if (inode->i_mapping && inode->i_mapping->nrpages != 0) { + /* write back any cached data */ rc = filemap_write_and_wait(inode->i_mapping); mapping_set_error(inode->i_mapping, rc); + rc = invalidate_inode_pages2(inode->i_mapping); + if (rc) { + cERROR(1, "%s: could not invalidate inode %p", __func__, + inode); + cifs_i->invalid_mapping = true; + } } - invalidate_remote_inode(inode); + cifs_fscache_reset_inode_cookie(inode); }