orangefs: move wakeups into set_op_state_{serviced,purged}()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
Al Viro
2016-01-21 23:17:37 -05:00
committed by Mike Marshall
parent b7ae37b09e
commit 831d094979
4 changed files with 14 additions and 13 deletions

View File

@@ -415,8 +415,6 @@ wakeup:
set_op_state_serviced(op);
spin_unlock(&op->lock);
wake_up_interruptible(&op->waitq);
while (1) {
spin_lock(&op->lock);
prepare_to_wait_exclusive(
@@ -464,17 +462,14 @@ wakeup:
} else {
/*
* tell the vfs op waiting on a waitqueue that
* this op is done
*/
spin_lock(&op->lock);
set_op_state_serviced(op);
spin_unlock(&op->lock);
/*
* this op is done -
* for every other operation (i.e. non-I/O), we need to
* wake up the callers for downcall completion
* notification
*/
wake_up_interruptible(&op->waitq);
spin_lock(&op->lock);
set_op_state_serviced(op);
spin_unlock(&op->lock);
}
out:
return ret;