lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 22 Oct 2017 22:55:35 +0800
From:   Chao Yu <chao@...nel.org>
To:     Arnd Bergmann <arnd@...db.de>, Jaegeuk Kim <jaegeuk@...nel.org>,
        Chao Yu <yuchao0@...wei.com>
Cc:     Eric Biggers <ebiggers@...gle.com>, y2038@...ts.linaro.org,
        linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net,
        Deepa Dinamani <deepa.kernel@...il.com>,
        linux-fsdevel@...r.kernel.org, DongOh Shin <doscode.kr@...il.com>,
        Tomohiro Kusumi <tkusumi@...era.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid using timespec

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 <arnd@...db.de>

Reviewed-by: Chao Yu <yuchao0@...wei.com>

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);
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ