Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/shaggy/jfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  JFS: Fix multiple errors in metapage_releasepage
  • Loading branch information
Linus Torvalds committed May 24, 2006
2 parents 2786545 + b964638 commit 67e3812
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions fs/jfs/jfs_metapage.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ static int metapage_readpage(struct file *fp, struct page *page)
static int metapage_releasepage(struct page *page, gfp_t gfp_mask)
{
struct metapage *mp;
int busy = 0;
int ret = 1;
unsigned int offset;

for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) {
Expand All @@ -552,30 +552,20 @@ static int metapage_releasepage(struct page *page, gfp_t gfp_mask)
continue;

jfs_info("metapage_releasepage: mp = 0x%p", mp);
if (mp->count || mp->nohomeok) {
if (mp->count || mp->nohomeok ||
test_bit(META_dirty, &mp->flag)) {
jfs_info("count = %ld, nohomeok = %d", mp->count,
mp->nohomeok);
busy = 1;
ret = 0;
continue;
}
wait_on_page_writeback(page);
//WARN_ON(test_bit(META_dirty, &mp->flag));
if (test_bit(META_dirty, &mp->flag)) {
dump_mem("dirty mp in metapage_releasepage", mp,
sizeof(struct metapage));
dump_mem("page", page, sizeof(struct page));
dump_stack();
}
if (mp->lsn)
remove_from_logsync(mp);
remove_metapage(page, mp);
INCREMENT(mpStat.pagefree);
free_metapage(mp);
}
if (busy)
return -1;

return 0;
return ret;
}

static void metapage_invalidatepage(struct page *page, unsigned long offset)
Expand Down

0 comments on commit 67e3812

Please sign in to comment.