From patchwork Thu Jun 21 16:04:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10480167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 34655604D3 for ; Thu, 21 Jun 2018 16:05:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2442E2924D for ; Thu, 21 Jun 2018 16:05:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 190E729279; Thu, 21 Jun 2018 16:05:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB1F22924D for ; Thu, 21 Jun 2018 16:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933438AbeFUQFb (ORCPT ); Thu, 21 Jun 2018 12:05:31 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:39873 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932858AbeFUQFa (ORCPT ); Thu, 21 Jun 2018 12:05:30 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LisgQ-1g3Qoi3fvq-00dHDB; Thu, 21 Jun 2018 18:04:39 +0200 From: Arnd Bergmann To: Chris Mason , Josef Bacik , David Sterba Cc: Arnd Bergmann , Omar Sandoval , Nikolay Borisov , Liu Bo , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] [v2] btrfs: use timespec64 for i_otime Date: Thu, 21 Jun 2018 18:04:06 +0200 Message-Id: <20180621160420.139575-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180621160420.139575-1-arnd@arndb.de> References: <20180621160420.139575-1-arnd@arndb.de> X-Provags-ID: V03:K1:RPgmPI+oan5jG1gT9SLeDop9/LIgYHtQ9KYDsB1h1xaXWr8yp+c UaRWIZaiAUYks/IzZQ2BElAmtovyESS51Ui70vyZCk2MC90+TyieZm0kumPseEBiTeedEnq wknVgZsp2V5jeKukODUKXU2SVLiikKPrzO2sbeLyrrM1PU7CgR2RWvoqLXGNsaxQYSzaepE x+KjxBB10jNtnjVctOeHA== X-UI-Out-Filterresults: notjunk:1; V01:K0:HvGdXofP5Ik=:qas8yQWowTx6fRhINj6fcy 1wY9ruIx828wnFAslGJDAv3EwKQe896Xee1ekIr5dGISdxVQQ02ztrV1f/Xdq2JWyfNjRI41K 3qVaIPwd9dMgA0XEPTNtKC7xGwoc/Jfkq4xjAZDEsxDVvVYhzZcnBcdXhaQC9R9ZA0N0Elh0Q reTl7f/BbQ+HCcApZQ4pwIwrAM4HWEXtjSuiFHIuLetR+KOcHgSoQ4AyosrRqBFqWQLJafIbt Gps7utt86fuUqkaT1ki4NUqKv9yCNwLCgExyJ7MApczXxhvxzEVnmbpNvB/ck7rWo3xFAwRhK N8AAUWdAnLiOb0XuVsnp/uNTpMJp8GcezbeGHLLkHPiD2WWcSG6iFzXSQ1fAUArjkdpjWVUDG pqwFIDDtLhuLSCifANN7WC3cRLQSQbCScNK00FqnVy7bdGeEEIifISMh7DxNJwilf0UgvbBJc 3tWDDd+94RjXJQh68W4EXp7CYE4djY4N8pnd4qhqAlM2ago/R4b8LcISuj5ibuW3ksIYo8oY1 9C9mb/rbBYUmByi/fglY3vnXLIA8+AgRjVG8i5ZQiA58nJzyuVHj9ms9XfmxHFmYavyBt9IDN OG12DLifaYNmZdCKcQtkA+faWOhKiU3/yP99bRQufTAK7WSIUhq5MiJxY3P3piVTrgpJB22mr CtSI+j3Jv7zRM9FR1akCV3CsUoD4NsIPWodVWMsrC8NvReoICkXhZcJptP16M/4mMC2k= Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While the regular inode timestamps all use timespec64 now, the i_otime field is btrfs specific and still needs to be converted to correctly represent times beyond 2038. Signed-off-by: Arnd Bergmann Reviewed-by: Nikolay Borisov --- v2: no changes --- fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/inode.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 7e075343daa5..1343ac57b438 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -178,7 +178,7 @@ struct btrfs_inode { struct btrfs_delayed_node *delayed_node; /* File creation time. */ - struct timespec i_otime; + struct timespec64 i_otime; /* Hook into fs_info->delayed_iputs */ struct list_head delayed_iput; diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e9482f0db9d0..22dcc8afd38f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5745,7 +5745,7 @@ static struct inode *new_simple_dir(struct super_block *s, inode->i_mtime = current_time(inode); inode->i_atime = inode->i_mtime; inode->i_ctime = inode->i_mtime; - BTRFS_I(inode)->i_otime = timespec64_to_timespec(inode->i_mtime); + BTRFS_I(inode)->i_otime = inode->i_mtime; return inode; } @@ -6349,7 +6349,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, inode->i_mtime = current_time(inode); inode->i_atime = inode->i_mtime; inode->i_ctime = inode->i_mtime; - BTRFS_I(inode)->i_otime = timespec64_to_timespec(inode->i_mtime); + BTRFS_I(inode)->i_otime = inode->i_mtime; inode_item = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_inode_item);