Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5993901ybc; Wed, 27 Nov 2019 13:04:42 -0800 (PST) X-Google-Smtp-Source: APXvYqw3TH76F6jNCVf0nXX1wvwbVs9aJbSztfC05sz/dH4Zuc2tvXUe2soRaXukpSe6yX3/KUDg X-Received: by 2002:aa7:d64e:: with SMTP id v14mr34622499edr.88.1574888682502; Wed, 27 Nov 2019 13:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888682; cv=none; d=google.com; s=arc-20160816; b=KQD8Vc0rw57lCpgtRoKlIHrr+XgGorSph8L8Gs1iXv9wF2rB/xXxuG8QOdJFexmbGq 3Fn2Z1KRt6+y3FvpPXjw50zdrKX6dZOERa76L323Blk4nPcADyMgsCXs+9A0MCkRQUKd aEjVENAlfW0+SGmsmliKsdPVaqx8zNubrB97GfNKqcNsb3LhI4eQ6Gye2QSi3a+Zm7Dy UuzGM82PjCI/CBV9lcVO4qbRzqg0ARVp2GuXBGJwvUM7AGa8zVAK3cduuPqocK5NVtya WvWrK4YI0k6hrd7PHy2yNiuokb/DdKcmIEKt+Gqf5MPmq2utVSE/7w24UH/8fRsJtA8Z X0MQ== 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=fIBou4HeHG+qr++dPdwTvQuefpdb/kWn3efTxJCfLxo=; b=q4C5HrI0W2zZTvNg09iig8J8361CI5FyBH6Qpqpmm8qGDy0Hc2O+UDy2eqq7Vif1CO lvM9tRBPsX8rJxx03vS5KqYJe810ibNtiXPPVE9I5IgiDwzZg8iG07GRPFjH0q1HHAZi cnbP1jopStuoD1ds9tiiMBGiVcse8ac3N2Hwc0hHJMFaY7DEHcOd0lLLzuOcHix6r1aO g+8gg7DlsyJj/dTIUILcAB+b/Bacmvelb9E/iAew4K2wyGd/qF3vYaitakSVd7yxx+Sn ECUTPh7pQMi2lWbUKxN9JXTle7wmFIRL/ffEIbzR1CjsEZdHZfP449LtmTL4SjuxdHFi 0WSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EbhSmuKQ; 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 t30si12433422edi.207.2019.11.27.13.04.06; Wed, 27 Nov 2019 13:04:42 -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=EbhSmuKQ; 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 S1731403AbfK0VCd (ORCPT + 99 others); Wed, 27 Nov 2019 16:02:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:55206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731898AbfK0VCa (ORCPT ); Wed, 27 Nov 2019 16:02:30 -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 6EB49215A5; Wed, 27 Nov 2019 21:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888549; bh=W6T0qxVUQejosUr+bj/+5xttfCFxqDgrSuXmTQbWXog=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EbhSmuKQxB+liV0fakzcz46cC9IEKCqC72QezjmzgNimS643ZZEk1nCIZHPQ2XZgA HYPinaPA7iccZgCVtU/8ys5Pd08UtJgZsd377/f/MBwbGqQ6cohElLD1B9WLl1laAY ESI3G4F2jp2pbrstb6pjWHxSxYnWljbJY7NF6Y6E= 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 176/306] hfsplus: update timestamps on truncate() Date: Wed, 27 Nov 2019 21:30:26 +0100 Message-Id: <20191127203128.212013365@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 dc8844aada735890a6de109bef327f5df36a982e ] The vfs takes care of updating ctime and mtime on ftruncate(), but on truncate() it must be done by the module. This patch can be tested with xfstests generic/313. Link: http://lkml.kernel.org/r/9beb0913eea37288599e8e1b7cec8768fb52d1b8.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/hfsplus/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 8e9427a42b819..d7ab9d8c4b674 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c @@ -261,6 +261,7 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr) } truncate_setsize(inode, attr->ia_size); hfsplus_file_truncate(inode); + inode->i_mtime = inode->i_ctime = current_time(inode); } setattr_copy(inode, attr); -- 2.20.1