From: Chao Yu <chao@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>, Jaegeuk Kim <jaegeuk@kernel.org>,
Chao Yu <yuchao0@huawei.com>
Cc: Eric Biggers <ebiggers@google.com>,
y2038@lists.linaro.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Deepa Dinamani <deepa.kernel@gmail.com>,
linux-fsdevel@vger.kernel.org, DongOh Shin <doscode.kr@gmail.com>,
Tomohiro Kusumi <tkusumi@tuxera.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid using timespec
Date: Sun, 22 Oct 2017 22:55:35 +0800 [thread overview]
Message-ID: <05cd8aef-c68d-c47e-3dc5-5a13f515347a@kernel.org> (raw)
In-Reply-To: <20171019095252.688181-1-arnd@arndb.de>
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@arndb.de>
Reviewed-by: Chao Yu <yuchao0@huawei.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);
> }
>
prev parent reply other threads:[~2017-10-22 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 9:52 [PATCH] f2fs: avoid using timespec Arnd Bergmann
2017-10-22 14:55 ` Chao Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=05cd8aef-c68d-c47e-3dc5-5a13f515347a@kernel.org \
--to=chao@kernel.org \
--cc=arnd@arndb.de \
--cc=deepa.kernel@gmail.com \
--cc=doscode.kr@gmail.com \
--cc=ebiggers@google.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tkusumi@tuxera.com \
--cc=y2038@lists.linaro.org \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).