Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210868
b: refs/heads/master
c: 3d4401d
h: refs/heads/master
v: v3
  • Loading branch information
Yehuda Sadeh authored and Sage Weil committed Sep 11, 2010
1 parent 7bb1ef5 commit d95d7eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: ca04d9c3ec721e474f00992efc1b1afb625507f5
refs/heads/master: 3d4401d9d0aef5c40706350685ddea3df6708496
12 changes: 10 additions & 2 deletions trunk/fs/ceph/pagelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@

#include "pagelist.h"

static void ceph_pagelist_unmap_tail(struct ceph_pagelist *pl)
{
struct page *page = list_entry(pl->head.prev, struct page,
lru);
kunmap(page);
}

int ceph_pagelist_release(struct ceph_pagelist *pl)
{
if (pl->mapped_tail)
kunmap(pl->mapped_tail);
ceph_pagelist_unmap_tail(pl);

while (!list_empty(&pl->head)) {
struct page *page = list_first_entry(&pl->head, struct page,
lru);
Expand All @@ -26,7 +34,7 @@ static int ceph_pagelist_addpage(struct ceph_pagelist *pl)
pl->room += PAGE_SIZE;
list_add_tail(&page->lru, &pl->head);
if (pl->mapped_tail)
kunmap(pl->mapped_tail);
ceph_pagelist_unmap_tail(pl);
pl->mapped_tail = kmap(page);
return 0;
}
Expand Down

0 comments on commit d95d7eb

Please sign in to comment.