lkml.org 
[lkml]   [2015]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ceph: use msecs_to_jiffies for time conversion
From
On Fri, Feb 6, 2015 at 7:52 PM, Nicholas Mc Guire <hofrat@osadl.org> wrote:
> This is only an API consolidation and should make things more readable
> it replaces var * HZ / 1000 by msecs_to_jiffies(var).
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
>
> Patch was only compile tested with x86_64_defconfig + CONFIG_CEPH_FS=m
>
> Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
>
> fs/ceph/mds_client.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 5f62fb7..ced7503 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -3070,7 +3070,7 @@ static void handle_lease(struct ceph_mds_client *mdsc,
> di->lease_renew_from &&
> di->lease_renew_after == 0) {
> unsigned long duration =
> - le32_to_cpu(h->duration_ms) * HZ / 1000;
> + msecs_to_jiffies(le32_to_cpu(h->duration_ms));
>
> di->lease_seq = seq;
> dentry->d_time = di->lease_renew_from + duration;
> --
> 1.7.10.4

added to our testing branch

Thanks
Yan, Zheng
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


\
 
 \ /
  Last update: 2015-03-11 11:21    [W:0.037 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site