diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-01-04 20:31:25 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-09 15:44:40 +1100 |
commit | 0106246594a05f02a6be6ee4695c7584c758fa7f (patch) | |
tree | 7cdfada54320aef7a2dc7a3e558c0e5259f40c4f | |
parent | 5ef8224aaa9220bfecb362f0802cf78aad47c02a (diff) |
[PATCH] spufs fix spu_acquire_runnable error path
When spu_activate fails in spu_acquire_runnable, the
state must still be SPU_STATE_SAVED, we were
incorrectly setting it to SPU_STATE_RUNNABLE.
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index c5cd55ac848d..336f238102fd 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c @@ -132,10 +132,10 @@ int spu_acquire_runnable(struct spu_context *ctx) if (ctx->state == SPU_STATE_SAVED) { ret = spu_activate(ctx, 0); + if (ret) + goto out; ctx->state = SPU_STATE_RUNNABLE; } - if (ret) - goto out; downgrade_write(&ctx->state_sema); /* On success, we return holding the lock */ |