Skip to content

Commit

Permalink
[PATCH] spufs fix spu_acquire_runnable error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann authored and Paul Mackerras committed Jan 9, 2006
1 parent 5ef8224 commit 0106246
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/cell/spufs/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 0106246

Please sign in to comment.