* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
{
struct osc_device *dev = lu2osc_dev(obj->oo_cl.co_lu.lo_dev);
time64_t osc_contention_time = dev->od_contention_time;
- time64_t retry_time;
+ ktime_t retry_time;
if (OBD_FAIL_CHECK(OBD_FAIL_OSC_OBJECT_CONTENTION))
return 1;
* I like copy-paste. the code is copied from
* ll_file_is_contended.
*/
- retry_time = obj->oo_contention_time + osc_contention_time;
- if (ktime_get_seconds() > retry_time) {
+ retry_time = ktime_add_ns(obj->oo_contention_time,
+ osc_contention_time * NSEC_PER_SEC);
+ if (ktime_after(ktime_get(), retry_time)) {
osc_object_clear_contended(obj);
return 0;
}