diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-19 02:32:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-19 02:32:47 -0700 |
| commit | 66a759eb4d85542f900eba2b5f71f7bb3e2b73d4 (patch) | |
| tree | edff587feea6b98df991d4adc04ce2f528f830fd /include/linux/blkdev.h | |
| parent | bf7c3d2de183a1c138ac667e41be357ce59f5998 (diff) | |
[PATCH] blk_run_page() race fix
blk_run_page() is incorrectly using page->mapping, which makes it racy against
removal from swapcache.
Make block_sync_page() use page_mapping(), and remove bkl_run_page(), which
only had one caller.
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 03018e2f974a..020a72f20742 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -545,16 +545,6 @@ static inline void blk_run_address_space(struct address_space *mapping) blk_run_backing_dev(mapping->backing_dev_info, NULL); } -static inline void blk_run_page(struct page *page) -{ - struct address_space *mapping; - - smp_mb(); - mapping = page->mapping; - if (mapping) - blk_run_backing_dev(mapping->backing_dev_info, page); -} - /* * end_request() and friends. Must be called with the request queue spinlock * acquired. All functions called within end_request() _must_be_ atomic. |
