Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197465
b: refs/heads/master
c: 107c161
h: refs/heads/master
i:
  197463: bfad73b
v: v3
  • Loading branch information
Nitin Gupta authored and Greg Kroah-Hartman committed May 18, 2010
1 parent 6885452 commit db199b6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 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: b3a27d0529c6e5206f1b60f60263e3ecfd0d77cb
refs/heads/master: 107c161b7ddeeb7da43509cc6b29211885ccd9af
5 changes: 0 additions & 5 deletions trunk/drivers/staging/ramzswap/TODO

This file was deleted.

22 changes: 13 additions & 9 deletions trunk/drivers/staging/ramzswap/ramzswap_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,6 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio)

src = rzs->compress_buffer;

/*
* System swaps to same sector again when the stored page
* is no longer referenced by any process. So, its now safe
* to free the memory that was allocated for this page.
*/
if (rzs->table[index].page || rzs_test_flag(rzs, index, RZS_ZERO))
ramzswap_free_page(rzs, index);

mutex_lock(&rzs->lock);

user_mem = kmap_atomic(page, KM_USER0);
Expand Down Expand Up @@ -690,9 +682,21 @@ static int ramzswap_ioctl(struct block_device *bdev, fmode_t mode,
return ret;
}

void ramzswap_slot_free_notify(struct block_device *bdev, unsigned long index)
{
struct ramzswap *rzs;

rzs = bdev->bd_disk->private_data;
ramzswap_free_page(rzs, index);
rzs_stat64_inc(rzs, &rzs->stats.notify_free);

return;
}

static struct block_device_operations ramzswap_devops = {
.ioctl = ramzswap_ioctl,
.owner = THIS_MODULE,
.swap_slot_free_notify = ramzswap_slot_free_notify,
.owner = THIS_MODULE
};

static int create_device(struct ramzswap *rzs, int device_id)
Expand Down

0 comments on commit db199b6

Please sign in to comment.