diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-14 05:43:07 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-14 05:43:07 -0700 |
| commit | e059d5daf158b1bde61883ee5a091cd4875864a9 (patch) | |
| tree | b81340cab05c5405a489115bd442856fdaad7e28 /fs/buffer.c | |
| parent | 485ba3c3b6da6ca02daee0f961fe70beaebd32b3 (diff) | |
[PATCH] Add blk_run_page()
From: Andrea Arcangeli <andrea@suse.de>
From: Jens Axboe
Add blk_run_page() API. This is so that we can pass the target page all the
way down to (for example) the swap unplug function. So swap can work out
which blockdevs back this particular page.
Diffstat (limited to 'fs/buffer.c')
| -rw-r--r-- | fs/buffer.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index d791e8de08db..06af58d4c20c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -113,12 +113,7 @@ static int bh_wake_function(wait_queue_t *wait, unsigned mode, static void sync_buffer(struct buffer_head *bh) { - struct block_device *bd; - - smp_mb(); - bd = bh->b_bdev; - if (bd) - blk_run_address_space(bd->bd_inode->i_mapping); + blk_run_page(bh->b_page); } void fastcall __lock_buffer(struct buffer_head *bh) @@ -2960,10 +2955,7 @@ EXPORT_SYMBOL(try_to_free_buffers); int block_sync_page(struct page *page) { - struct address_space *mapping; - smp_mb(); - mapping = page->mapping; - blk_run_address_space(mapping); + blk_run_page(page); return 0; } |
