summaryrefslogtreecommitdiffstats
path: root/fs/logfs/dev_bdev.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-04-21 15:26:56 -0700
committerTony Lindgren <tony@atomide.com>2010-04-21 15:26:56 -0700
commite2bca7c76a79b68506bfc3699beb74c0d41fe230 (patch)
tree1b0269083de5ccc61a96b615ef271098df8e1b6a /fs/logfs/dev_bdev.c
parentb3c7740a120c8a7775cb63b4d094466da5c01692 (diff)
parentd54a45e2533ef33678dc340298b022a289d2b3e3 (diff)
downloadop-kernel-dev-e2bca7c76a79b68506bfc3699beb74c0d41fe230.zip
op-kernel-dev-e2bca7c76a79b68506bfc3699beb74c0d41fe230.tar.gz
Merge branch 'for_2.6.34rc_a' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus
Diffstat (limited to 'fs/logfs/dev_bdev.c')
-rw-r--r--fs/logfs/dev_bdev.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
index 9718c22..a5d0c56 100644
--- a/fs/logfs/dev_bdev.c
+++ b/fs/logfs/dev_bdev.c
@@ -80,6 +80,7 @@ static void writeseg_end_io(struct bio *bio, int err)
prefetchw(&bvec->bv_page->flags);
end_page_writeback(page);
+ page_cache_release(page);
} while (bvec >= bio->bi_io_vec);
bio_put(bio);
if (atomic_dec_and_test(&super->s_pending_writes))
@@ -97,8 +98,10 @@ static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index,
unsigned int max_pages = queue_max_hw_sectors(q) >> (PAGE_SHIFT - 9);
int i;
+ if (max_pages > BIO_MAX_PAGES)
+ max_pages = BIO_MAX_PAGES;
bio = bio_alloc(GFP_NOFS, max_pages);
- BUG_ON(!bio); /* FIXME: handle this */
+ BUG_ON(!bio);
for (i = 0; i < nr_pages; i++) {
if (i >= max_pages) {
@@ -191,8 +194,10 @@ static int do_erase(struct super_block *sb, u64 ofs, pgoff_t index,
unsigned int max_pages = queue_max_hw_sectors(q) >> (PAGE_SHIFT - 9);
int i;
+ if (max_pages > BIO_MAX_PAGES)
+ max_pages = BIO_MAX_PAGES;
bio = bio_alloc(GFP_NOFS, max_pages);
- BUG_ON(!bio); /* FIXME: handle this */
+ BUG_ON(!bio);
for (i = 0; i < nr_pages; i++) {
if (i >= max_pages) {
OpenPOWER on IntegriCloud