Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3147616rdh; Thu, 28 Sep 2023 04:17:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8laeKyfJhvqbTJ847L0J7llAJA9LwTIDLeXRFMlzxZzmaOFMyHP+U/rDInMi0fvvPKX+h X-Received: by 2002:a25:1303:0:b0:d7b:9a33:4c6a with SMTP id 3-20020a251303000000b00d7b9a334c6amr771712ybt.1.1695899852195; Thu, 28 Sep 2023 04:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695899852; cv=none; d=google.com; s=arc-20160816; b=emLAo5ww5oYe8yYI/zMZ/WqMZ2K8W6tAUCHsslkTzyrsUC3izUD0kj8bOKExpWqoA6 mIG5QFNKgCl+iU5IC14e915nalFiZB9+NRqiAeiOMN7WD7wrj0Mj4AcuafB2o10slj06 RtbOFq49aLcpZp/YTh268FycmcmXeezFpf5+AN0h0YWQe5gbM5/1ZbVFhI1Pxay7oeJg gVROT69MChl8DRnqo1ww2Pewdl/qyjydU7Af7K1iAD17+Yl19CE8FfiXITN3iBwJmT86 w2MBhCIK5hi7xk4rwj2Kbi+yvK+S5DtqI47U7NVnO0tlhaTI+B3kjiJ/V8JleifBYPR9 jLYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=mN2zI7hmmk0OaF/sDp+7em4cbqQjvzrbeVvKlHh3NkQ=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=E0X8o7Zn3Qi9vi//uNMRNtnk1CmTBgGu9G2Bof9uiQwpmOe2E1je0duhbxT35X5MCb cKytZ/8mBlOpZZgf37+JpWG30YKIX5qdFqF7YYgmjQ66cPqAUik7wD5bHpimJfpe++Fr EU4J2fdjtv/rSG/OKJvBhV+rSDHS/3kZ1FLu7ufHAv82dqdUgVl+phtOG4USXyunmQS7 osBLfF1Q4aI2eFLuaI6guen8cIdJEH6gbQHl3eu7eeqVSID2JIvpgjtmI5p5BMsf2h9+ BPAH0uOY1xwpobLX/SHJJHgsH3vxLDvrJtmGsv7EYJLehqgBkb17MlF3jPrnzKFxQ3rN t3FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DHN1zSTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id i2-20020a639d02000000b0057c7341d568si16710041pgd.645.2023.09.28.04.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 04:17:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DHN1zSTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 73F7B82B1E6D; Thu, 28 Sep 2023 04:11:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232002AbjI1LKf (ORCPT + 99 others); Thu, 28 Sep 2023 07:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbjI1LJh (ORCPT ); Thu, 28 Sep 2023 07:09:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B3CB26A8; Thu, 28 Sep 2023 04:05:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FF0BC433CD; Thu, 28 Sep 2023 11:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899137; bh=hlr3TuYXADCwXim6mrb06nRfR5jkoWz/gdSaebmF2Wk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DHN1zSTMmlijWdkQdsxILM1rMD6qm/KfhRdJ42/vzxS3V+NcgFL+2g1ejKwXc5v3z XUVf2sB4aQNaity8J9vOZG8yRp0VjM2q52tSmDoMbBiJdDweFp94TdKbsHyt2CGSDS +V/DTt2NVv0dnll9nK591330UW6kkOGnbkLUAsDDK+oh3C89kN2xkq+rh9KLQXYN0W z2Z9etLeDNjf6qlLlbiT25InrBlsE/c8GPQCo+R4oVzG4FcU2zX2XH8evG0BChzpFN ncL1f9sPkRW0B+g/hCoQ33qImFPztdvTERVHkhMEIuol5Gg02Y4hwAdNfQaGe7TGJJ j/uAV0kIlFQ7g== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 70/87] fs/sysv: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:03:19 -0400 Message-ID: <20230928110413.33032-69-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928110413.33032-1-jlayton@kernel.org> References: <20230928110300.32891-1-jlayton@kernel.org> <20230928110413.33032-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 28 Sep 2023 04:11:27 -0700 (PDT) Signed-off-by: Jeff Layton --- fs/sysv/dir.c | 6 +++--- fs/sysv/ialloc.c | 2 +- fs/sysv/inode.c | 10 ++++------ fs/sysv/itree.c | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c index 2f5ead88d00b..2e126d72d619 100644 --- a/fs/sysv/dir.c +++ b/fs/sysv/dir.c @@ -224,7 +224,7 @@ int sysv_add_link(struct dentry *dentry, struct inode *inode) memset (de->name + namelen, 0, SYSV_DIRSIZE - namelen - 2); de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino); dir_commit_chunk(page, pos, SYSV_DIRSIZE); - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); mark_inode_dirty(dir); err = sysv_handle_dirsync(dir); out_page: @@ -249,7 +249,7 @@ int sysv_delete_entry(struct sysv_dir_entry *de, struct page *page) } de->inode = 0; dir_commit_chunk(page, pos, SYSV_DIRSIZE); - inode->i_mtime = inode_set_ctime_current(inode); + inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode)); mark_inode_dirty(inode); return sysv_handle_dirsync(inode); } @@ -346,7 +346,7 @@ int sysv_set_link(struct sysv_dir_entry *de, struct page *page, } de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino); dir_commit_chunk(page, pos, SYSV_DIRSIZE); - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); mark_inode_dirty(dir); return sysv_handle_dirsync(inode); } diff --git a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c index 6719da5889d9..269df6d49815 100644 --- a/fs/sysv/ialloc.c +++ b/fs/sysv/ialloc.c @@ -165,7 +165,7 @@ struct inode * sysv_new_inode(const struct inode * dir, umode_t mode) dirty_sb(sb); inode_init_owner(&nop_mnt_idmap, inode, dir, mode); inode->i_ino = fs16_to_cpu(sbi, ino); - inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); inode->i_blocks = 0; memset(SYSV_I(inode)->i_data, 0, sizeof(SYSV_I(inode)->i_data)); SYSV_I(inode)->i_dir_start_lookup = 0; diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 0aa3827d8178..8b7977f39722 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c @@ -200,11 +200,9 @@ struct inode *sysv_iget(struct super_block *sb, unsigned int ino) i_gid_write(inode, (gid_t)fs16_to_cpu(sbi, raw_inode->i_gid)); set_nlink(inode, fs16_to_cpu(sbi, raw_inode->i_nlink)); inode->i_size = fs32_to_cpu(sbi, raw_inode->i_size); - inode->i_atime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_atime); - inode->i_mtime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_mtime); + inode_set_atime(inode, fs32_to_cpu(sbi, raw_inode->i_atime), 0); + inode_set_mtime(inode, fs32_to_cpu(sbi, raw_inode->i_mtime), 0); inode_set_ctime(inode, fs32_to_cpu(sbi, raw_inode->i_ctime), 0); - inode->i_atime.tv_nsec = 0; - inode->i_mtime.tv_nsec = 0; inode->i_blocks = 0; si = SYSV_I(inode); @@ -253,8 +251,8 @@ static int __sysv_write_inode(struct inode *inode, int wait) raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(i_gid_read(inode))); raw_inode->i_nlink = cpu_to_fs16(sbi, inode->i_nlink); raw_inode->i_size = cpu_to_fs32(sbi, inode->i_size); - raw_inode->i_atime = cpu_to_fs32(sbi, inode->i_atime.tv_sec); - raw_inode->i_mtime = cpu_to_fs32(sbi, inode->i_mtime.tv_sec); + raw_inode->i_atime = cpu_to_fs32(sbi, inode_get_atime(inode).tv_sec); + raw_inode->i_mtime = cpu_to_fs32(sbi, inode_get_mtime(inode).tv_sec); raw_inode->i_ctime = cpu_to_fs32(sbi, inode_get_ctime(inode).tv_sec); si = SYSV_I(inode); diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c index edb94e55de8e..725981474e5f 100644 --- a/fs/sysv/itree.c +++ b/fs/sysv/itree.c @@ -423,7 +423,7 @@ void sysv_truncate (struct inode * inode) } n++; } - inode->i_mtime = inode_set_ctime_current(inode); + inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode)); if (IS_SYNC(inode)) sysv_sync_inode (inode); else -- 2.41.0