From patchwork Tue Jul 31 17:24:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 10551107 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 605FB15E2 for ; Tue, 31 Jul 2018 17:24:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 439B52A3F8 for ; Tue, 31 Jul 2018 17:24:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37CF62AC81; Tue, 31 Jul 2018 17:24:54 +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 1A2A52A3F8 for ; Tue, 31 Jul 2018 17:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729622AbeGaTGK (ORCPT ); Tue, 31 Jul 2018 15:06:10 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:33747 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727999AbeGaTGK (ORCPT ); Tue, 31 Jul 2018 15:06:10 -0400 Received: by mail-it0-f42.google.com with SMTP id d16-v6so13016886itj.0 for ; Tue, 31 Jul 2018 10:24:51 -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=BFp2m7vheij4351/HUpE463JD3rhLIj0ETKN7UWHAS4=; b=O6hfcPSH835G+GkOkcwJDrcY0wnVxKM+vOZN5TJeLvcdUovZE/cfhgoaiWQFGWrHI0 KMWVfDzrBISuN/FJogDsU/e03/7e7SudkW+mugo0/bIevFMS1P0u2M0d82HHduF+/FYn n5Lq7ylgJ/RPtMKX6R1dBdymYmpatQNW/c5yi8yrg7dpauKeuKfCXT18BlMDl1phtsFQ IQOrnR4X+qcmuOwWsJnJEi1bp6fJ3jb2VylVoHt4mdW+Zm3IrsDGrsNkB+wSLdBQVyUj eaSH4FwffInnDY8BF5thr/4FlDJQoVJN4vyhwbbCD60VUCVyzmPuXelPq0A+FZn3IhGZ IgAA== 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=BFp2m7vheij4351/HUpE463JD3rhLIj0ETKN7UWHAS4=; b=pzwk6+7marj1wpNRVMFRMFlQcJiRaUG45eftrB7uX+/oSyIJyqKVPuPJ0041Z5WGti FLpV8P8V6insXAaTz+39BUlc1E6kcoLA8UQbuMQg9rZWBcPEzozEx5hh+uVmsXOB9EVk UVrmRP08A0BXCxORfppxpwvTMFKPJpRd+LE+Du16L3vUav27YVl9kJa7rPcTKLB0jMHX y6Nsv/GPGdPLsaDfbRSDXNoFaNrDdbBbUhMdb1IEB9Y8qpR8jyP8PbN9WFnJjSdklF+I GOymfDlFITj/fZt4eDPTkH6zh7Jna8ls7ClDHka1Jg90HwcyrfLyjsHeJYNp3LR+DD7h g9RA== X-Gm-Message-State: AOUpUlFPtnVjjZtxOvkhUvdonE/pQWav1Gi19JXuzd44SxO3DAWKJ5cz PzKz18/hS7K2vDTqA4UaMg== X-Google-Smtp-Source: AAOMgpf0ucNomlTIkt5CsijrqDvOCjbvsYroSKoR1b5FJLTn3uo0WLFPlYrxus+TfxBp11zLC91doQ== X-Received: by 2002:a02:b5ce:: with SMTP id y14-v6mr21278080jaj.128.1533057891311; Tue, 31 Jul 2018 10:24:51 -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 b15-v6sm1751038itb.25.2018.07.31.10.24.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 10:24:50 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 3/3] NFSv4: Mark the inode change attribute up to date in update_changeattr() Date: Tue, 31 Jul 2018 13:24:26 -0400 Message-Id: <20180731172426.6491-4-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180731172426.6491-3-trond.myklebust@hammerspace.com> References: <20180731172426.6491-1-trond.myklebust@hammerspace.com> <20180731172426.6491-2-trond.myklebust@hammerspace.com> <20180731172426.6491-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 9d181d76c744..a1faeb2de954 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); }