Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6016302ybc; Wed, 27 Nov 2019 13:27:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxlKFzgldJeWqlpt/DP+kpnrohUlkfgz6wyDhu5KZkYW/eO/c1t6RdrCYRz59+lQI/9xMnw X-Received: by 2002:a17:906:194a:: with SMTP id b10mr51557820eje.123.1574890052015; Wed, 27 Nov 2019 13:27:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890052; cv=none; d=google.com; s=arc-20160816; b=c9ezIq/snQKzN7XumfqQYzm0hSJJ+1W2UIiNUTNmgZRQGYlz/H9Ge2lmTjPBJncHiq V2iSsUJ0nhalrVLkSNinrF6stGzcIg6Efbo3aisxJ5dYt4W8Oz9OQDyWmpzr+k2Sdo2n NxI8c4oHcFm6mK0LlJBKYozkR1xYAFly1ZkjCU8XaM7rMZVqGdOFBN2C1qQhEweDjgVn zR83zK7rm58ftQluu5AroXheop+Bk+zh7xtHEMk+/xwzJumkGvay0bXF67aAJIzHBNtX RYb2SJ+TbZY7Icpv+82vIL/s/3EAPMggmvGU+U1El5NmpMwG9e0hlsMLxbAixd5ORC6O 6Tbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MzJawq8KYqqB/uqtw01OYtOuK1nIWlVHwlVIG0pHdoM=; b=PLSquiMISwAIZlK718uXqmLBGdZx7eYfcgQBEl+MYTDevW5Wi2PXHa0L9ZXPUkmh7j Aqcvt8TLj7lOqnzZ8BSWHTK6OC2wfhh/Moy3y1Ym5NimvdOgVB0zZfjd7//PJoBeG4xY Aogbr4jZaK3bCwFZfVUY/5GU4APSv9N2iWeiT5Lh3ava+dWhAomIpOrawokeSRnfl8aF QWirGa2D7Zxmn3gI0QJG7opgNw14JSJBOIqlMTnMpI6lbf+FFrSDjNJzchRZs2Lz+qo3 V+DgmRb1Y7mgPJDqS7+8VKV85vbMRZLZdOOlZ8TrkBNmJP5opXcEgPcN55KsvJ7dAK8D fuLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AgYduGC2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bx7si4051529edb.403.2019.11.27.13.27.08; Wed, 27 Nov 2019 13:27:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AgYduGC2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732572AbfK0VY4 (ORCPT + 99 others); Wed, 27 Nov 2019 16:24:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:55272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731496AbfK0VCc (ORCPT ); Wed, 27 Nov 2019 16:02:32 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD704215A5; Wed, 27 Nov 2019 21:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888552; bh=EQZ7mfCriInnZRn9UMpQSDdMM3ZNFHm+aa73nZvvwtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AgYduGC2ZdS5387eaQho2TeweJspTCEe0trdZwJhOOM6KRf6vpA1rx2Bh5ZJIlsac nI51fR8wXSZ/wSWSTTbgMdVajWm2+bRcAu6CFjlJLqlwXyhT8Ar2IGvZQAIGEJ9i2z BzUlZiF5T9Vf6ruYG9Yzjfw5tmA1qlcBFy7prV18= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "=?UTF-8?q?Ernesto=20A . =20Fern=C3=A1ndez?=" , Vyacheslav Dubeyko , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.19 177/306] hfs: update timestamp on truncate() Date: Wed, 27 Nov 2019 21:30:27 +0100 Message-Id: <20191127203128.278019724@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ernesto A. Fernández [ Upstream commit 8cd3cb5061730af085a3f9890a3352f162b4e20c ] The vfs takes care of updating mtime on ftruncate(), but on truncate() it must be done by the module. Link: http://lkml.kernel.org/r/e1611eda2985b672ed2d8677350b4ad8c2d07e8a.1539316825.git.ernesto.mnd.fernandez@gmail.com Signed-off-by: Ernesto A. Fernández Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- fs/hfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index a2dfa1b2a89c7..da243c84e93b0 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -642,6 +642,8 @@ int hfs_inode_setattr(struct dentry *dentry, struct iattr * attr) truncate_setsize(inode, attr->ia_size); hfs_file_truncate(inode); + inode->i_atime = inode->i_mtime = inode->i_ctime = + current_time(inode); } setattr_copy(inode, attr); -- 2.20.1