From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751614AbdJVOz6 (ORCPT ); Sun, 22 Oct 2017 10:55:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:58280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751558AbdJVOz5 (ORCPT ); Sun, 22 Oct 2017 10:55:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89E8921871 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=chao@kernel.org Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid using timespec To: Arnd Bergmann , Jaegeuk Kim , Chao Yu Cc: Eric Biggers , y2038@lists.linaro.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Deepa Dinamani , linux-fsdevel@vger.kernel.org, DongOh Shin , Tomohiro Kusumi References: <20171019095252.688181-1-arnd@arndb.de> From: Chao Yu Message-ID: <05cd8aef-c68d-c47e-3dc5-5a13f515347a@kernel.org> Date: Sun, 22 Oct 2017 22:55:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171019095252.688181-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/10/19 17:52, Arnd Bergmann wrote: > 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 Thanks, > --- > 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); > } >