From patchwork Mon Oct 16 17:26:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 1849490 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=S317Igb0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4S8PDL5wJwz20Vq for ; Tue, 17 Oct 2023 04:26:42 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbjJPR0k (ORCPT ); Mon, 16 Oct 2023 13:26:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjJPR0j (ORCPT ); Mon, 16 Oct 2023 13:26:39 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C64C283; Mon, 16 Oct 2023 10:26:37 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c5028e5b88so48084161fa.3; Mon, 16 Oct 2023 10:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697477196; x=1698081996; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=AsBurwJXbB4R5awevx162dcbGLikXeWMaEzzvRwyTNk=; b=S317Igb0HnsgcDGaE2FBwBcLt2Xg0DcfIocFl0iK0S/YjPld5cSo8CF4LXiI2ZiLd+ /fNQssOT1DUyTmj0A0I5kHykSaHOfL0ts8/SV4spXIGaPaGTO1r212zGQa438YCTlOf6 PI1/WfHcTphYD002V4LC7mHa+eKhAU8klQBhAprpakRyZfdm//vglogYx5BbevQbf6wA UdvrNsaWbGhl/dgXuKqHPePz7FSraud965xV7t+6GUxpRagq/eQncbINwTP7e/IiblnU RpmUcJ51EKQ6moVb26zsu2SQ14uNpXa/xD8o36NTUzjX1Pd0+RY6qr+Ca3N74WCNPQzA AJuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697477196; x=1698081996; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AsBurwJXbB4R5awevx162dcbGLikXeWMaEzzvRwyTNk=; b=IGNXiLyDPf2BsUcvPRNWt7GhxQphNCg+zG103glm17ZEriojPylnHDjPOeclVuup+8 g9jGFBSETZ7p6P5IGjZWAwj8KA+kV1FPHaMD7qD9+1lxbxC6X/VD2khSouO3r8rkJsMU 1TbuTdBLUCIrmDH9Ld5/flAvTNT9oBD9VuLx2ea5vRdjqEezWBCo2RJV8cWr+XL2bLx3 AkUjZ9BeICit/Qp054a5L8b8p0z9BqQwv7yknt7j4TiXO3bRK4r6hZIGSef8dhjZV6FQ 1vQXnUKzE035gcGg1b3n7QXbUZHEzSC3/TkM98ZeomlROagC0NFIsavgkdwQ+2raw7Kc VFUg== X-Gm-Message-State: AOJu0YyPJq1McDqn+BB24N13K1Ij3MgCAPntk8YX4UTdRPNRSYPB7jTd iH8XHcI1GtCJtLO4ev3Hsgx24rMX6DKXvec8b4if6pm3GW8PZQ== X-Google-Smtp-Source: AGHT+IGgujqKyKcOrEpjXPQnPSTK+WOvMNi0lUfQFbpw2hAKHjQ6nShR1n4EuyDlQwMEWQOiKAkbAmPDk1YmkQTiPRg= X-Received: by 2002:a2e:740e:0:b0:2c1:8a24:7afb with SMTP id p14-20020a2e740e000000b002c18a247afbmr29329503ljc.7.1697477195291; Mon, 16 Oct 2023 10:26:35 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Mon, 16 Oct 2023 12:26:23 -0500 Message-ID: Subject: [PATCH][SMB3 client] fix touch -h of symlink To: CIFS Cc: samba-technical , linux-fsdevel X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org For example: touch -h -t 02011200 testfile where testfile is a symlink would not change the timestamp, but touch -t 02011200 testfile does work to change the timestamp of the target Looks like some symlink inode operations are missing for other fs as well From 6af5f835ba4987994aecbba0d7c060160c892856 Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 16 Oct 2023 12:18:23 -0500 Subject: [PATCH] smb3: fix touch -h of symlink For example: touch -h -t 02011200 testfile where testfile is a symlink would not change the timestamp, but touch -t 02011200 testfile does work to change the timestamp of the target Reported-by: Micah Veilleux Closes: https://bugzilla.samba.org/show_bug.cgi?id=14476 Cc: Stable Signed-off-by: Steve French --- fs/smb/client/cifsfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c index 22869cda1356..ea3a7a668b45 100644 --- a/fs/smb/client/cifsfs.c +++ b/fs/smb/client/cifsfs.c @@ -1191,6 +1191,7 @@ const char *cifs_get_link(struct dentry *dentry, struct inode *inode, const struct inode_operations cifs_symlink_inode_ops = { .get_link = cifs_get_link, + .setattr = cifs_setattr, .permission = cifs_permission, .listxattr = cifs_listxattr, }; -- 2.39.2