From patchwork Wed Oct 4 18:52:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13409273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15384E7C4EF for ; Wed, 4 Oct 2023 18:55:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244903AbjJDSzr (ORCPT ); Wed, 4 Oct 2023 14:55:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244910AbjJDSzR (ORCPT ); Wed, 4 Oct 2023 14:55:17 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42D941B1; Wed, 4 Oct 2023 11:54:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2D32C433C7; Wed, 4 Oct 2023 18:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445684; bh=eBRJgq4pYENd3lA/W3dIxqsi+Z0ZXzS6MLhi4HYXHRk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I0bV7/jtFNVwLNCrFGhCnbya4CmI3f4uLC41x/r0r7htllVHrzHDii16a6fY8/Sxs NBbaAvZa0q4m75QEoBA3HfKTItSJIP66n7OZZgGYeGfo98d0zgz6xr+dzRlYoh4Oqf n1JrVP0yOW85NU9c6twujKqcU/yYI8+KcxQhAYsjCZR3PEuDEhox9SEwI3JnZoGrRL TMZoZlBjQ8wnsB2WIjsjK1GxNYG9UYVcvpwpEvv1hF9YCLpvSYllzb/fiHYVJl14I9 ADtvyGCDRnOLWl0e1tuh5gHE8QrJBycr4Bf8jyFC4s5xd9kvqpIrIcZfAbWiI+3CSb +KvSNijR0BTPg== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 49/89] kernfs: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:52:34 -0400 Message-ID: <20231004185347.80880-47-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004185347.80880-1-jlayton@kernel.org> References: <20231004185221.80802-1-jlayton@kernel.org> <20231004185347.80880-1-jlayton@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/kernfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c index 922719a343a7..401c084300ed 100644 --- a/fs/kernfs/inode.c +++ b/fs/kernfs/inode.c @@ -151,7 +151,7 @@ ssize_t kernfs_iop_listxattr(struct dentry *dentry, char *buf, size_t size) static inline void set_default_inode_attr(struct inode *inode, umode_t mode) { inode->i_mode = mode; - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); } static inline void set_inode_attr(struct inode *inode, @@ -159,8 +159,8 @@ static inline void set_inode_attr(struct inode *inode, { inode->i_uid = attrs->ia_uid; inode->i_gid = attrs->ia_gid; - inode->i_atime = attrs->ia_atime; - inode->i_mtime = attrs->ia_mtime; + inode_set_atime_to_ts(inode, attrs->ia_atime); + inode_set_mtime_to_ts(inode, attrs->ia_mtime); inode_set_ctime_to_ts(inode, attrs->ia_ctime); }