diff options
author | Jan Beulich <jbeulich@suse.com> | 2012-09-11 14:18:08 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2012-09-11 14:18:08 +0200 |
commit | bdd868c82cefa4517c1b5a5ae96231c3de80c703 (patch) | |
tree | 61f29422f1d69c98ed667d42634faf5d42665b84 /xen/common/tmem.c | |
parent | 6c777beb83875f7e0cc77ca357025608a56b3560 (diff) | |
download | xen-bdd868c82cefa4517c1b5a5ae96231c3de80c703.tar.gz xen-bdd868c82cefa4517c1b5a5ae96231c3de80c703.tar.bz2 xen-bdd868c82cefa4517c1b5a5ae96231c3de80c703.zip |
tmem: properly drop lock on error path in do_tmem_get()
Also remove a bogus assertion.
Reported-by: Tim Deegan <tim@xen.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'xen/common/tmem.c')
-rw-r--r-- | xen/common/tmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/common/tmem.c b/xen/common/tmem.c index b1d0017e47..6385cd1fcb 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -1790,7 +1790,6 @@ static NOINLINE int do_tmem_get(pool_t *pool, OID *oidp, uint32_t index, list_del(&pgp->us.client_eph_pages); list_add_tail(&pgp->us.client_eph_pages,&client->ephemeral_page_list); tmem_spin_unlock(&eph_lists_spinlock); - ASSERT(obj != NULL); obj->last_client = tmh_get_cli_id_from_current(); } } @@ -1807,6 +1806,8 @@ static NOINLINE int do_tmem_get(pool_t *pool, OID *oidp, uint32_t index, return 1; bad_copy: + obj->no_evict = 0; + tmem_spin_unlock(&obj->obj_spinlock); failed_copies++; return rc; } |