From patchwork Wed Nov 8 03:45:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 13449541 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E3211C32 for ; Wed, 8 Nov 2023 03:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZorB3MuF" Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EAE718C for ; Tue, 7 Nov 2023 19:45:15 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-5079f9ec8d9so409926e87.0 for ; Tue, 07 Nov 2023 19:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699415113; x=1700019913; darn=vger.kernel.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=PQtjhjELkZQjaz9znHgdKufw0NPIBxGd1ImfzzNrcpw=; b=ZorB3MuFVz1BpJG9iHRCwXF4Jp6FEeUVsLiwkToHtQNpaRN+mXbGJYW7lrWi+HIA4E LARhLCiMHeLf5cwo3xAIDhk86m135wURYogmQAtlCpuoOyD8Yq7YRXkNRwEorlgC51Tn C0YmxPwd4W3JpeByP5VSpQ3Mdz0akDxZC592uNz32q5mKg02eKylISZB2wVM+UNFSPLh B1Zu0BOqoYqPGq/6KPbIz5csrlFGwrRSHgpMVCDCk8enPNByapx8nwhuUAccn19BAknq UxSfXWiIGAyY8G7H0741ZtmgqIhZRBvmMrDqi7uRkYWBkxyjB3hdiO1DbsKbKBDZxlE0 kgcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699415113; x=1700019913; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PQtjhjELkZQjaz9znHgdKufw0NPIBxGd1ImfzzNrcpw=; b=QM0dlNdlmIuE9siarDaEoosXc5O40KgNYirT/M8HbGri3uFMjBMPFZaeLhsDYicBP1 D8Gn3+01y155yHLmVU+LvT7o7DEZ2rMqHpwZ5X0gmCH47L1Nalincb5GT+wtPoqzw1T+ UB9YLp0ASmpTz7UoqeR7Orf5qJ9+aP1jmijVMtX3QBJt1MpzOuvoSMpwytVlEQ5VZddP gXHvhaqdXV3/aid0sXKjjdCexgdhfFJXQDBVMI6Gr4NsWmgdRx977ypIUAx8bduSLBTD HasQJdhr3l0IdVG0QfH3WxtuqC6luoDqJaDD46nWW+D8WfZW13QVmpgrh2+b6zfsY0tW jibA== X-Gm-Message-State: AOJu0Yy8ECZ0+JxRQI1qfuEDizcTQFlOzyL2ivP/Gr0xUUm91pVdKcen M9zNINkzNsRFqAFavELkc/YZjMcgCe5qujm2YZbZxnyBCZBpRCjQ X-Google-Smtp-Source: AGHT+IGQwqqjbeWWr9ruBgiNobzgpROMX7RPFvxjqMP5iO/TtpXYy4pb9nXc0BE+v5RS+cZApQyc6NbLC8HMnzlbzp0= X-Received: by 2002:a19:6d01:0:b0:501:ba04:f352 with SMTP id i1-20020a196d01000000b00501ba04f352mr1746858lfc.1.1699415113096; Tue, 07 Nov 2023 19:45:13 -0800 (PST) Precedence: bulk X-Mailing-List: linux-cifs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Steve French Date: Tue, 7 Nov 2023 21:45:01 -0600 Message-ID: Subject: Fix for xfstest generic/728 To: CIFS smb3: fix caching of ctime on setxattr Fixes xfstest generic/728 which had been failing due to incorrect ctime after setxattr and removexattr Update ctime on successful set of xattr Cc: stable@vger.kernel.org See attached patch From cca985cd3578593348537613af20b1fd6af9a1d5 Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 7 Nov 2023 21:38:13 -0600 Subject: [PATCH] smb3: fix caching of ctime on setxattr Fixes xfstest generic/728 which had been failing due to incorrect ctime after setxattr and removexattr Update ctime on successful set of xattr Cc: stable@vger.kernel.org Signed-off-by: Steve French --- fs/smb/client/xattr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/smb/client/xattr.c b/fs/smb/client/xattr.c index ac199160bce6..6780aa3e98a1 100644 --- a/fs/smb/client/xattr.c +++ b/fs/smb/client/xattr.c @@ -150,10 +150,13 @@ static int cifs_xattr_set(const struct xattr_handler *handler, if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) goto out; - if (pTcon->ses->server->ops->set_EA) + if (pTcon->ses->server->ops->set_EA) { rc = pTcon->ses->server->ops->set_EA(xid, pTcon, full_path, name, value, (__u16)size, cifs_sb->local_nls, cifs_sb); + if (rc == 0) + inode_set_ctime_current(inode); + } break; case XATTR_CIFS_ACL: -- 2.39.2