Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287416
b: refs/heads/master
c: 9256a47
h: refs/heads/master
v: v3
  • Loading branch information
Dan Magenheimer authored and Greg Kroah-Hartman committed Feb 8, 2012
1 parent b0f9c79 commit c53270d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5b1247bd1c3ab6722acfa95213be9a16bfb664c
refs/heads/master: 9256a4789be3dae37d00924c03546ba7958ea5a3
7 changes: 3 additions & 4 deletions trunk/drivers/staging/zcache/zcache-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ static struct zbud_hdr *zbud_create(uint16_t client_id, uint16_t pool_id,
if (unlikely(zbpg == NULL))
goto out;
/* ok, have a page, now compress the data before taking locks */
spin_lock(&zbpg->lock);
spin_lock(&zbud_budlists_spinlock);
spin_lock(&zbpg->lock);
list_add_tail(&zbpg->bud_list, &zbud_unbuddied[nchunks].list);
zbud_unbuddied[nchunks].count++;
zh = &zbpg->buddy[0];
Expand Down Expand Up @@ -389,12 +389,11 @@ static struct zbud_hdr *zbud_create(uint16_t client_id, uint16_t pool_id,
zh->oid = *oid;
zh->pool_id = pool_id;
zh->client_id = client_id;
/* can wait to copy the data until the list locks are dropped */
spin_unlock(&zbud_budlists_spinlock);

to = zbud_data(zh, size);
memcpy(to, cdata, size);
spin_unlock(&zbpg->lock);
spin_unlock(&zbud_budlists_spinlock);

zbud_cumul_chunk_counts[nchunks]++;
atomic_inc(&zcache_zbud_curr_zpages);
zcache_zbud_cumul_zpages++;
Expand Down

0 comments on commit c53270d

Please sign in to comment.