From patchwork Tue Nov 2 09:01:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 296842 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 oA290lLn015221 for ; Tue, 2 Nov 2010 09:01:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412Ab0KBJBU (ORCPT ); Tue, 2 Nov 2010 05:01:20 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:55927 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398Ab0KBJBT (ORCPT ); Tue, 2 Nov 2010 05:01:19 -0400 Received: by wyf28 with SMTP id 28so6421772wyf.19 for ; Tue, 02 Nov 2010 02:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=vV8LX0s2PYMi7I/n3SwjPmi4zQMLGrzyAlSRuobntNo=; b=NRjSP/7VuLTIfg9SMm5c1b74+1nBy9/lPNxCH/XlZr+vATLuA+NmkY+KsbOhy09iz7 a0icNIYQH/ZXf4WiXynLTcmYJ6rKFBXrvDhfW4f/XpXw5NigTEIssCKC5v3PMqqgQnPF dQ7XJoPQbE6JWN3V96JI9O6J3lATDGOvNZm3Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=SYNGROoknebHA38NfSzH1Skk9yY3EQDOYS4iYirJkhHiBKGHjPMvMuZ7HKUMPkmXZj Gr/MQeY/i7Ld/bcTZv3oLEouOp6JCa/Xap+TIgGJZpR3uy2EuqOYlD+WJGoufqZWwSpf 9uSXrs2BM1TpEHvauFCbOAQINE3ut6ryM0Yag= MIME-Version: 1.0 Received: by 10.227.196.74 with SMTP id ef10mr47745wbb.18.1288688477774; Tue, 02 Nov 2010 02:01:17 -0700 (PDT) Received: by 10.216.70.136 with HTTP; Tue, 2 Nov 2010 02:01:17 -0700 (PDT) Date: Tue, 2 Nov 2010 12:01:17 +0300 Message-ID: Subject: [PATCH 2/5] CIFS: Invalidate inode pages on the last close From: Pavel Shilovsky To: linux-cifs@vger.kernel.org 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.3 (demeter1.kernel.org [140.211.167.41]); Tue, 02 Nov 2010 09:01:20 +0000 (UTC) diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h index 525ba59..3690c50 100644 --- a/fs/cifs/cifs_fs_sb.h +++ b/fs/cifs/cifs_fs_sb.h @@ -40,6 +40,7 @@ #define CIFS_MOUNT_FSCACHE 0x8000 /* local caching enabled */ #define CIFS_MOUNT_MF_SYMLINKS 0x10000 /* Minshall+French Symlinks enabled */ #define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */ +#define CIFS_MOUNT_STRICT_IO 0x40000 /* strict cache mode */ struct cifs_sb_info { struct radix_tree_root tlink_tree; diff --git a/fs/cifs/file.c b/fs/cifs/file.c index a566f15..3970e68 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -284,6 +284,9 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file) } spin_unlock(&cifs_file_list_lock); + if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) + invalidate_remote_inode(inode); + if (!tcon->need_reconnect && !cifs_file->invalidHandle) { int xid, rc;