From patchwork Tue Jul 31 19:54:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 10551307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 93E521822 for ; Tue, 31 Jul 2018 19:54:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 858AC2B353 for ; Tue, 31 Jul 2018 19:54:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79B882B48F; Tue, 31 Jul 2018 19:54:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F8CF2B431 for ; Tue, 31 Jul 2018 19:54:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732458AbeGaVgc (ORCPT ); Tue, 31 Jul 2018 17:36:32 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:45777 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732372AbeGaVgc (ORCPT ); Tue, 31 Jul 2018 17:36:32 -0400 Received: by mail-io0-f176.google.com with SMTP id k16-v6so14085738iom.12 for ; Tue, 31 Jul 2018 12:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6+qrIzPCCMw6yBRALXbL2owiwbyaf2sBaEai21Tosnc=; b=DhCb+hwenfxCDzGqlCMSPHNQJ/0Y/bSrrBkEvS8yMHKZ3DyU/oyeyZp0vQELNF0DIi /KrBgB5khmKur62WhkO/siKMfZygryItM9sTsTfQ7m6Ek1MeWsbuTgG+3Cid8bGd3eyF 3LlufmMrDdOlj2nngZbN6xnx+2jbdI1T8ejEroXTltSCWl/LR+MB4+9KrlX06LTeaKEx JxQzULhPy2S2fm6ggvCrpLH2jb8b0X4rvdo17hvOqJjzobugNp+F4MCQ9ANmQpgxE10O 92gwUQmfFMt/LZ1k5kduyWY/Vh9OyxoRHFRgEjCemg31ZLP7/fpEQ6lv9E96gqZq65bw q2SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6+qrIzPCCMw6yBRALXbL2owiwbyaf2sBaEai21Tosnc=; b=htV9Zs/kvGIrU/CKzh8g6oQ3jy6qI7Za2I9eUdiZ3BhvmsIyVQALxUYSazKEQNr8fd 9RsGRa/t2ydRyrES/3mZJzzM14oQUbWHMqxVmbRj4DXDKdVcgUKYVLKfZaBYKo9sTQiU nT4e0Ku3v4mUGCsnHO/YQknwiQu4GfFNxCVoQ/9jpde4IoRm7toyyao7gMqbouOW5ydW YRTHLJ/nf1vdR9dy6mChGt03WIC8Ju8olm3yScHyxL5nQ6ODD87FObmYWtwIR3bRhwaR /LSaVjor+aWs3B2eBKcUq5hjnijbZW8mF/Z+sMTejJVg7G6drGw3a1G9PMhilUxJiXrq HUPQ== X-Gm-Message-State: AOUpUlEhPnQxXx8Wr57ecdsP5nA0hOC7g73rEULGxFqNfLumqPnBgm/O q3DPDx2OaDK3r9C9rrty1RxSfpc= X-Google-Smtp-Source: AAOMgpdyseRzeneHgB5XI86/nVy9JHXDAdR8a8BYxRs95b07aqoxfqnYoz8XneHHSrt9Jkgw1e0TFQ== X-Received: by 2002:a6b:d014:: with SMTP id x20-v6mr899271ioa.181.1533066878535; Tue, 31 Jul 2018 12:54:38 -0700 (PDT) Received: from leira.trondhjem.org.localdomain (50-36-89-147.alma.mi.frontiernet.net. [50.36.89.147]) by smtp.gmail.com with ESMTPSA id x197-v6sm2147205itb.5.2018.07.31.12.54.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 12:54:37 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH v3 3/3] NFSv4: Mark the inode change attribute up to date in update_changeattr() Date: Tue, 31 Jul 2018 15:54:12 -0400 Message-Id: <20180731195412.10912-4-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180731195412.10912-3-trond.myklebust@hammerspace.com> References: <20180731195412.10912-1-trond.myklebust@hammerspace.com> <20180731195412.10912-2-trond.myklebust@hammerspace.com> <20180731195412.10912-3-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When we update the change attribute, we should also clear the flag that says it is out of date. Signed-off-by: Trond Myklebust --- fs/nfs/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 2f07a31e2fb6..a8617fa865e5 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1107,6 +1107,7 @@ update_changeattr_locked(struct inode *dir, struct nfs4_change_info *cinfo, inode_set_iversion_raw(dir, cinfo->after); nfsi->read_cache_jiffies = timestamp; nfsi->attr_gencount = nfs_inc_attr_generation_counter(); + nfsi->cache_validity &= ~NFS_INO_INVALID_CHANGE; nfs_fscache_invalidate(dir); }