Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197464
b: refs/heads/master
c: b3a27d0
h: refs/heads/master
v: v3
  • Loading branch information
Nitin Gupta authored and Greg Kroah-Hartman committed May 18, 2010
1 parent bfad73b commit 6885452
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b27256439568950f30864ccecaeb6dfb588089d5
refs/heads/master: b3a27d0529c6e5206f1b60f60263e3ecfd0d77cb
2 changes: 2 additions & 0 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,8 @@ struct block_device_operations {
unsigned long long);
int (*revalidate_disk) (struct gendisk *);
int (*getgeo)(struct block_device *, struct hd_geometry *);
/* this callback is with swap_lock and sometimes page table lock held */
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
struct module *owner;
};

Expand Down
4 changes: 4 additions & 0 deletions trunk/mm/swapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ static unsigned char swap_entry_free(struct swap_info_struct *p,

/* free if no reference */
if (!usage) {
struct gendisk *disk = p->bdev->bd_disk;
if (offset < p->lowest_bit)
p->lowest_bit = offset;
if (offset > p->highest_bit)
Expand All @@ -583,6 +584,9 @@ static unsigned char swap_entry_free(struct swap_info_struct *p,
swap_list.next = p->type;
nr_swap_pages++;
p->inuse_pages--;
if ((p->flags & SWP_BLKDEV) &&
disk->fops->swap_slot_free_notify)
disk->fops->swap_slot_free_notify(p->bdev, offset);
}

return usage;
Expand Down

0 comments on commit 6885452

Please sign in to comment.