aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/osc/osc_object.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-02-13 08:22:36 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-16 15:19:10 +0100
commitdb1d6cbc2a2c7f9fa3ae71b999a73e827d0f43ae (patch)
treeb4aadab59b15d25456dce5cc80f2f2f99ca01471 /drivers/staging/lustre/lustre/osc/osc_object.c
parentstaging: lustre: discard SVC_SIGNAL and related functions (diff)
downloadlinux-dev-db1d6cbc2a2c7f9fa3ae71b999a73e827d0f43ae.tar.xz
linux-dev-db1d6cbc2a2c7f9fa3ae71b999a73e827d0f43ae.zip
staging: lustre: replace simple cases of l_wait_event() with wait_event().
When the lwi arg is full of zeros, l_wait_event() behaves almost identically to the standard wait_event_idle() interface, so use that instead. l_wait_event() uses TASK_INTERRUPTIBLE, but blocks all signals. wait_event_idle() uses the new TASK_IDLE and so avoids adding to the load average without needing to block signals. In one case, wait_event_idle_exclusive() is needed. Also remove all l_wait_condition*() macros which were short-cuts for setting lwi to {0}. Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: NeilBrown <neilb@suse.com> Reviewed-by: Patrick Farrell <paf@cray.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/osc/osc_object.c')
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_object.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_object.c b/drivers/staging/lustre/lustre/osc/osc_object.c
index f82c87a77550..6c424f0290bb 100644
--- a/drivers/staging/lustre/lustre/osc/osc_object.c
+++ b/drivers/staging/lustre/lustre/osc/osc_object.c
@@ -454,12 +454,10 @@ struct lu_object *osc_object_alloc(const struct lu_env *env,
int osc_object_invalidate(const struct lu_env *env, struct osc_object *osc)
{
- struct l_wait_info lwi = { 0 };
-
CDEBUG(D_INODE, "Invalidate osc object: %p, # of active IOs: %d\n",
osc, atomic_read(&osc->oo_nr_ios));
- l_wait_event(osc->oo_io_waitq, !atomic_read(&osc->oo_nr_ios), &lwi);
+ wait_event_idle(osc->oo_io_waitq, !atomic_read(&osc->oo_nr_ios));
/* Discard all dirty pages of this object. */
osc_cache_truncate_start(env, osc, 0, NULL);