From patchwork Tue Mar 15 22:55:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 638141 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 p2FMufb3007754 for ; Tue, 15 Mar 2011 22:56:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755430Ab1COW4d (ORCPT ); Tue, 15 Mar 2011 18:56:33 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:41861 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755589Ab1COW4X (ORCPT ); Tue, 15 Mar 2011 18:56:23 -0400 Received: by fxm17 with SMTP id 17so1128784fxm.19 for ; Tue, 15 Mar 2011 15:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer; bh=xNENFhxISeOveYqqbxZxXPr6k8leejGdXtMV25wohE8=; b=G0EKlGOn9ujwvKe6/Igo01JTVJHo2NXyKci6LZ0Z+EYiVBLDVWBa6ZQMxexGOD2wSh dz8dy7bhjDJw8iD9TzUSklKejCoaa7utbNbSkjLYTWscfsKl6/F+IVtDvH1kICgZVk0w 6JpRZwJsyCZfJrj3wyiiY1pwAIp0pH9/AvLd4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=V7I+5GvCJ5v7gB1JySKk3HBfejLPXew/0qJv3+btIBrUZTCw9yK/SToT8vzNfMD921 IU9KJv7uFCOOG4d1HxCL/PUp2ew4S1MlBUDGaADZ0+55o5JvRtiJ0imMcpyi7im2O7Hb pmQM2kXumIH8LzI/OWMMktqjaQGnV+oDYRoU4= Received: by 10.223.155.135 with SMTP id s7mr115638faw.10.1300229782396; Tue, 15 Mar 2011 15:56:22 -0700 (PDT) Received: from localhost.localdomain ([95.84.12.86]) by mx.google.com with ESMTPS id f16sm172379faa.14.2011.03.15.15.56.21 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 15:56:22 -0700 (PDT) From: Pavel Shilovsky To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org Subject: [PATCH] CIFS: Use invalidate_inode_pages2 instead of invalidate_remote_inode (try #4) Date: Wed, 16 Mar 2011 01:55:32 +0300 Message-Id: <1300229732-4902-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:56:41 +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); }