Plug memory leak in writeseg_end_io
authorJoern Engel <joern@logfs.org>
Wed, 17 Mar 2010 14:29:38 +0000 (15:29 +0100)
committerJoern Engel <joern@logfs.org>
Sat, 27 Mar 2010 10:19:14 +0000 (11:19 +0100)
Signed-off-by: Joern Engel <joern@logfs.org>
fs/logfs/dev_bdev.c

index f99f5dcce54636be419ad6ce4851f6837b0afb31..a5d0c56d3ebc925b44d8d6a3a1bf0e8765d603ad 100644 (file)
@@ -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))