From patchwork Thu Sep 23 20:44:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 12513709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E6AAC433F5 for ; Thu, 23 Sep 2021 20:45:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A17561211 for ; Thu, 23 Sep 2021 20:45:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243078AbhIWUqn (ORCPT ); Thu, 23 Sep 2021 16:46:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhIWUqn (ORCPT ); Thu, 23 Sep 2021 16:46:43 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D073C061574 for ; Thu, 23 Sep 2021 13:45:11 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id y28so30865114lfb.0 for ; Thu, 23 Sep 2021 13:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to:cc; bh=eYqxMGBzLMPUFkc/XnV3n4Wo1Y/eFNpHTDl68ugcuKI=; b=nXFcR4YDtzkTLrt80Z2skbcF3domDdUOefPWslpwyIucgwhhmnujn353+k1Z+oVzj8 Sx6chGl4EDR2JnN/P66X4Ux/ugTVp7UypJy4nhowU6L0FPx9O4+OcQIDODgP4llaCP1x DHBuCVAEjXBcoEWWwcuCysEPf4fXFQgfIHW2AjtraqsKijJf2L/1fX9q9zBfVLhSFFqA lM9jqcd4v9e/2pGzDU/ebeOaW8EO/xj2DH0P6bV7NWJ+rD9F3rkNMqBq3re+G8fjyGd7 vNSvvKciECM1ZQwf/V2cdJx2YhI/GEij40IIdeJCe4aNn97T4dI12wnKKP8DC0jlNzL/ Nf8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=eYqxMGBzLMPUFkc/XnV3n4Wo1Y/eFNpHTDl68ugcuKI=; b=mM7C41gTzxy6fwUMgwSo3sL1wAdJnCkMlyQWs4jhfzswhIvxgcqAfY8HaWdhleQGhl gZijeZqJWAPP6jtXPjPTsRXImU3gYdBJamu0EKI/1p8SA2MeHJtWwH/O9HcgVClPCmLR Ni04P6ieJ5+iVObf2jIQyapTyAPtvFxkE3QsbwTmE3RmH63Di2N99rMgiQPQNmH9mVec /XhWFhBkJVNl4CQsX+tzHdpYiYtAs77QmWNep5YikH/LGDnj4GUo92wkbEhz5RNAeYbc TxEinJj+wIVCXxLPg5zl8k5zvz2/H2/w53Jkw8+CZMgXacqkK3Kki/50cQIWZATTLTPL 3LdA== X-Gm-Message-State: AOAM531jgPArnsJfXOV8GQZkDBe84zFJA0FX3SpyLEYIRHr1P26Jx/yT 6UNGvb58lURhkZpErg4v15i+s4G+gJkPGMYuonw7NPCk8+U= X-Google-Smtp-Source: ABdhPJwGv1aKCTtkLppoI0GF6+p0vLUh+vL2t8oHrkEfy7st+tWdB8icrjPkE7RzFTgqybkRthJAX4vLGbx0EQFN3L4= X-Received: by 2002:a2e:a78d:: with SMTP id c13mr7322160ljf.314.1632429909132; Thu, 23 Sep 2021 13:45:09 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Thu, 23 Sep 2021 15:44:58 -0500 Message-ID: Subject: [PATCH][CIFS] Clear modified attribute bit from inode flags To: CIFS Cc: rohiths msft , Paulo Alcantara Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Added Cc: stable@vger.kernel.org # 5.13+ since it fixes a problem with git regression tests and deferred close (which went in 5.13).and merged into cifs-2.6.git for-next pending testing See attached. Clear CIFS_INO_MODIFIED_ATTR bit from inode flags after updating mtime and ctime From 233ca166a21629b3c884f5d764af93455fdb8638 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 23 Sep 2021 12:42:35 -0500 Subject: [PATCH] cifs: Clear modified attribute bit from inode flags Clear CIFS_INO_MODIFIED_ATTR bit from inode flags after updating mtime and ctime Signed-off-by: Rohith Surabattula Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Steve French --- fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 0ab5bb24b8ca..13f3182cf796 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -884,7 +884,7 @@ int cifs_close(struct inode *inode, struct file *file) cinode->lease_granted && !test_bit(CIFS_INO_CLOSE_ON_LOCK, &cinode->flags) && dclose) { - if (test_bit(CIFS_INO_MODIFIED_ATTR, &cinode->flags)) { + if (test_and_clear_bit(CIFS_INO_MODIFIED_ATTR, &cinode->flags)) { inode->i_ctime = inode->i_mtime = current_time(inode); cifs_fscache_update_inode_cookie(inode); } -- 2.30.2