From patchwork Wed Oct 4 18:52:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13409249 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 6B3AAE7C4EE for ; Wed, 4 Oct 2023 18:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244865AbjJDSy5 (ORCPT ); Wed, 4 Oct 2023 14:54:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244610AbjJDSyj (ORCPT ); Wed, 4 Oct 2023 14:54:39 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACD7194; Wed, 4 Oct 2023 11:54:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 152C2C433C7; Wed, 4 Oct 2023 18:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445648; bh=VZeO+KnP0i1FeqM9/WQ8dV1qUSykp6CVzxV5q5AtMB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rVuNjVHqLVXKtCF8V9QISykbfPweeRDvwbMinu2ovVQpxwapBwWpIIFVteeAe+3a6 cYfLkTUg0JDy4TYKZyztkUThmAzhVVE/+eMuArnkQtfSaPubU1d17ue6S/4hdWSpva DALvVd4hOeNdSE+ilgZhxCatPXs9Vmlxqvzu1ljONuqNaaJOvHTYnYhNlR8e6itx6e oAYI+b0dDP20O3wjsR+/Wa6WYgRHxsTLNcincm1a9xHHTBmQJJIzM0tI2isko7M3ji ouZ3iEV+i4GGc4QLw3fCVFbpbo/YQXSPdLvkvBolQXN+RRPTthOjkiiDvs5Um3oKdz Y7D2D1TqKrsCg== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Brian Foster , linux-bcachefs@vger.kernel.org Subject: [PATCH v2 20/89] bcachefs: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:52:05 -0400 Message-ID: <20231004185347.80880-18-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 Acked-by: Brian Foster --- fs/bcachefs/fs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 09137a20449b..1fbaad27d07b 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -66,9 +66,9 @@ void bch2_inode_update_after_write(struct btree_trans *trans, inode->v.i_mode = bi->bi_mode; if (fields & ATTR_ATIME) - inode->v.i_atime = bch2_time_to_timespec(c, bi->bi_atime); + inode_set_atime_to_ts(&inode->v, bch2_time_to_timespec(c, bi->bi_atime)); if (fields & ATTR_MTIME) - inode->v.i_mtime = bch2_time_to_timespec(c, bi->bi_mtime); + inode_set_mtime_to_ts(&inode->v, bch2_time_to_timespec(c, bi->bi_mtime)); if (fields & ATTR_CTIME) inode_set_ctime_to_ts(&inode->v, bch2_time_to_timespec(c, bi->bi_ctime)); @@ -753,8 +753,8 @@ static int bch2_getattr(struct mnt_idmap *idmap, stat->gid = inode->v.i_gid; stat->rdev = inode->v.i_rdev; stat->size = i_size_read(&inode->v); - stat->atime = inode->v.i_atime; - stat->mtime = inode->v.i_mtime; + stat->atime = inode_get_atime(&inode->v); + stat->mtime = inode_get_mtime(&inode->v); stat->ctime = inode_get_ctime(&inode->v); stat->blksize = block_bytes(c); stat->blocks = inode->v.i_blocks; @@ -1418,8 +1418,8 @@ static int inode_update_times_fn(struct btree_trans *trans, { struct bch_fs *c = inode->v.i_sb->s_fs_info; - bi->bi_atime = timespec_to_bch2_time(c, inode->v.i_atime); - bi->bi_mtime = timespec_to_bch2_time(c, inode->v.i_mtime); + bi->bi_atime = timespec_to_bch2_time(c, inode_get_atime(&inode->v)); + bi->bi_mtime = timespec_to_bch2_time(c, inode_get_mtime(&inode->v)); bi->bi_ctime = timespec_to_bch2_time(c, inode_get_ctime(&inode->v)); return 0;