Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289159
b: refs/heads/master
c: 041aba1
h: refs/heads/master
i:
  289157: 89f4a65
  289155: 2754d65
  289151: 4b7db50
v: v3
  • Loading branch information
Seth Jennings authored and Greg Kroah-Hartman committed Feb 29, 2012
1 parent 176f0cc commit 365b44e
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 843c666d16e62e4b3889f1491a1d91b87ddc7bd3
refs/heads/master: 041aba19b916ddfd5254c80ef413ef8a7e76c8ad
6 changes: 2 additions & 4 deletions trunk/drivers/staging/zcache/zcache-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ static struct zv_hdr *zv_create(struct zs_pool *pool, uint32_t pool_id,
u32 size = clen + sizeof(struct zv_hdr);
int chunks = (size + (CHUNK_SIZE - 1)) >> CHUNK_SHIFT;
void *handle = NULL;
char *buf;

BUG_ON(!irqs_disabled());
BUG_ON(chunks >= NCHUNKS);
Expand All @@ -710,14 +709,13 @@ static struct zv_hdr *zv_create(struct zs_pool *pool, uint32_t pool_id,
goto out;
atomic_inc(&zv_curr_dist_counts[chunks]);
atomic_inc(&zv_cumul_dist_counts[chunks]);
zv = (struct zv_hdr *)((char *)cdata - sizeof(*zv));
zv = zs_map_object(pool, handle);
zv->index = index;
zv->oid = *oid;
zv->pool_id = pool_id;
zv->size = clen;
SET_SENTINEL(zv, ZVH);
buf = zs_map_object(pool, handle);
memcpy(buf, zv, clen + sizeof(*zv));
memcpy((char *)zv + sizeof(struct zv_hdr), cdata, clen);
zs_unmap_object(pool, handle);
out:
return handle;
Expand Down

0 comments on commit 365b44e

Please sign in to comment.