From patchwork Thu Oct 19 09:52:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10016321 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 C3160603FF for ; Thu, 19 Oct 2017 09:53:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1B2628C6D for ; Thu, 19 Oct 2017 09:53:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9665328CB8; Thu, 19 Oct 2017 09:53:37 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 2B2D628CB5 for ; Thu, 19 Oct 2017 09:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752682AbdJSJxV (ORCPT ); Thu, 19 Oct 2017 05:53:21 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:63608 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752649AbdJSJxU (ORCPT ); Thu, 19 Oct 2017 05:53:20 -0400 Received: from wuerfel.lan ([46.223.139.202]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0LuKFr-1d7Tlm3xGp-011kQe; Thu, 19 Oct 2017 11:52:58 +0200 From: Arnd Bergmann To: Jaegeuk Kim , Chao Yu Cc: y2038@lists.linaro.org, Deepa Dinamani , linux-fsdevel@vger.kernel.org, Arnd Bergmann , DongOh Shin , Eric Biggers , Tomohiro Kusumi , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: avoid using timespec Date: Thu, 19 Oct 2017 11:52:47 +0200 Message-Id: <20171019095252.688181-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:dNzpShjWRugIyp3rwZ+XjyWmCuRyA0iUPhBrNvgSEUgBcqMKUJB AGyeCAZ0to4r8XB0oYMYw+9GhQ4GPuCFFuQn7XxAxWakmw9SkffY8SSGvW0G//wbBh4a0Cu Rql7NiROjxTQiMRj1IXga9Tfddg0Ckorbv9AMNEB/PoELQ02ToZUJ3j2MKp7BcOokBiKYu6 QE7L8FB/XaaV83aE3bLEw== X-UI-Out-Filterresults: notjunk:1; V01:K0:XDN1MyPOcnY=:h5aGwoavvinrumzeemIOxt fFaHLT4wMpXNsN+iReRCPgdEthhjPr1N/H/doOBsC2irguU0JoQv1LsS+Eg5ArwJATNprlTC3 dRb42fMgi4Qe6NVqoWlLX1Z4RdJVgVtnZoLPi5r5EmOrIDyUzKQxID1q1V1KCk8PBHCx7LlRi KKgelx21Kve6TJjtTrJ6SVCJpNiqT/Ik9cyCY8M25foxvecSFDLkC2DE0lDH1JevY+99YfyuU FGXaNpSmiw0eQ1pJMHiU5dS7SMTGiMEGbgzr1EcM6/F73bBverXbMvTCDtJ/wotb4oDO4nl8g q8IoDZL6hsZPgi/zrEq/zHdMSi5Yjqf1TzODIPDB8095wqfFe6EdYPyJtVjVgeoiZSAy1cM2X W2ouS1XnReS6RhqQ5jhXfYlHGMXutoZVNv5TDEsVjYoyGNWeSPe+wA2v9O5WAAZV+jVnndyKi mhhRFWP9B0Eai5N++7L+Jd49Adkk5zce8J12PmNIO45mzqWlTFM0Xpy3LtKAif6jnuH5m0y8a 4r6S6NZHiPYCs8r/0FsiZSK5lgdRh7x9P0EtFqAnfMzNo6FpkHFswAWt5MCwP+9sVqHeX0Yj1 etVx35cG+gn3mv8vuQn2L3/g98E+yZes7kLzCmJyDchvQU0P+sK6wLJAK6/lQNJ+XmFOIx31d 3wR7A5x+a3vOxWTOCfKskC9sZNaePObJKCqUr1KAOQlFt5Erw9La/K1o5Dlp0kZT98AUdfrbW 3792kAhzkEr4MsmzZJ0xS4ZwD/iKFunCmQcOsA== Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All uses of timespec are deprecated, and this one is not particularly useful, as the documented method for converting seconds to jiffies is to multiply by 'HZ'. Signed-off-by: Arnd Bergmann Reviewed-by: Chao Yu --- fs/f2fs/f2fs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 4b4a72f392be..b9a4a5db426c 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1178,8 +1178,7 @@ static inline void f2fs_update_time(struct f2fs_sb_info *sbi, int type) static inline bool f2fs_time_over(struct f2fs_sb_info *sbi, int type) { - struct timespec ts = {sbi->interval_time[type], 0}; - unsigned long interval = timespec_to_jiffies(&ts); + unsigned long interval = sbi->interval_time[type] * HZ; return time_after(jiffies, sbi->last_time[type] + interval); }