f2fs: avoid using timespec
authorArnd Bergmann <arnd@arndb.de>
Thu, 19 Oct 2017 09:52:47 +0000 (11:52 +0200)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 26 Oct 2017 08:44:25 +0000 (10:44 +0200)
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 <arnd@arndb.de>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h

index a49d281..4034459 100644 (file)
@@ -1205,8 +1205,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);
 }