powerpc/spufs: Fix multiple get_spu_context()
authorJeremy Kerr <jk@ozlabs.org>
Tue, 2 Sep 2008 01:57:09 +0000 (11:57 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 5 Sep 2008 00:51:00 +0000 (10:51 +1000)
commit9f43e3914dceb0f8191875b3cdf4325b48d0d70a
tree4a8636e5a353cc4e5e8f29b0c8f6ad14c0b379d0
parent7888bc2b4778fda267a6e6422c4497dba865a47a
powerpc/spufs: Fix multiple get_spu_context()

Commit 8d5636fbca202f61fdb808fc9e20c0142291d802 introduced a reference
count on SPU contexts during find_victim, but this may cause a leak in
the reference count if we later find a better contender for a context to
unschedule.

Change the reference to after we've found our victim context, so we
don't do the extra get_spu_context().

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spufs/sched.c