diff options
Diffstat (limited to 'fs')
51 files changed, 32 insertions, 305 deletions
diff --git a/fs/adfs/inode.c b/fs/adfs/inode.c index 65794b8fe79e..1cc84b276131 100644 --- a/fs/adfs/inode.c +++ b/fs/adfs/inode.c | |||
@@ -73,7 +73,6 @@ static sector_t _adfs_bmap(struct address_space *mapping, sector_t block) | |||
73 | static const struct address_space_operations adfs_aops = { | 73 | static const struct address_space_operations adfs_aops = { |
74 | .readpage = adfs_readpage, | 74 | .readpage = adfs_readpage, |
75 | .writepage = adfs_writepage, | 75 | .writepage = adfs_writepage, |
76 | .sync_page = block_sync_page, | ||
77 | .write_begin = adfs_write_begin, | 76 | .write_begin = adfs_write_begin, |
78 | .write_end = generic_write_end, | 77 | .write_end = generic_write_end, |
79 | .bmap = _adfs_bmap | 78 | .bmap = _adfs_bmap |
diff --git a/fs/affs/file.c b/fs/affs/file.c index 0a90dcd46de2..acf321b70fcd 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c | |||
@@ -429,7 +429,6 @@ static sector_t _affs_bmap(struct address_space *mapping, sector_t block) | |||
429 | const struct address_space_operations affs_aops = { | 429 | const struct address_space_operations affs_aops = { |
430 | .readpage = affs_readpage, | 430 | .readpage = affs_readpage, |
431 | .writepage = affs_writepage, | 431 | .writepage = affs_writepage, |
432 | .sync_page = block_sync_page, | ||
433 | .write_begin = affs_write_begin, | 432 | .write_begin = affs_write_begin, |
434 | .write_end = generic_write_end, | 433 | .write_end = generic_write_end, |
435 | .bmap = _affs_bmap | 434 | .bmap = _affs_bmap |
@@ -786,7 +785,6 @@ out: | |||
786 | const struct address_space_operations affs_aops_ofs = { | 785 | const struct address_space_operations affs_aops_ofs = { |
787 | .readpage = affs_readpage_ofs, | 786 | .readpage = affs_readpage_ofs, |
788 | //.writepage = affs_writepage_ofs, | 787 | //.writepage = affs_writepage_ofs, |
789 | //.sync_page = affs_sync_page_ofs, | ||
790 | .write_begin = affs_write_begin_ofs, | 788 | .write_begin = affs_write_begin_ofs, |
791 | .write_end = affs_write_end_ofs | 789 | .write_end = affs_write_end_ofs |
792 | }; | 790 | }; |
@@ -1550,9 +1550,11 @@ static void aio_batch_free(struct hlist_head *batch_hash) | |||
1550 | struct hlist_node *pos, *n; | 1550 | struct hlist_node *pos, *n; |
1551 | int i; | 1551 | int i; |
1552 | 1552 | ||
1553 | /* | ||
1554 | * TODO: kill this | ||
1555 | */ | ||
1553 | for (i = 0; i < AIO_BATCH_HASH_SIZE; i++) { | 1556 | for (i = 0; i < AIO_BATCH_HASH_SIZE; i++) { |
1554 | hlist_for_each_entry_safe(abe, pos, n, &batch_hash[i], list) { | 1557 | hlist_for_each_entry_safe(abe, pos, n, &batch_hash[i], list) { |
1555 | blk_run_address_space(abe->mapping); | ||
1556 | iput(abe->mapping->host); | 1558 | iput(abe->mapping->host); |
1557 | hlist_del(&abe->list); | 1559 | hlist_del(&abe->list); |
1558 | mempool_free(abe, abe_pool); | 1560 | mempool_free(abe, abe_pool); |
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index b1d0c794747b..06457ed8f3e7 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -75,7 +75,6 @@ static const struct inode_operations befs_dir_inode_operations = { | |||
75 | 75 | ||
76 | static const struct address_space_operations befs_aops = { | 76 | static const struct address_space_operations befs_aops = { |
77 | .readpage = befs_readpage, | 77 | .readpage = befs_readpage, |
78 | .sync_page = block_sync_page, | ||
79 | .bmap = befs_bmap, | 78 | .bmap = befs_bmap, |
80 | }; | 79 | }; |
81 | 80 | ||
diff --git a/fs/bfs/file.c b/fs/bfs/file.c index eb67edd0f8ea..f20e8a71062f 100644 --- a/fs/bfs/file.c +++ b/fs/bfs/file.c | |||
@@ -186,7 +186,6 @@ static sector_t bfs_bmap(struct address_space *mapping, sector_t block) | |||
186 | const struct address_space_operations bfs_aops = { | 186 | const struct address_space_operations bfs_aops = { |
187 | .readpage = bfs_readpage, | 187 | .readpage = bfs_readpage, |
188 | .writepage = bfs_writepage, | 188 | .writepage = bfs_writepage, |
189 | .sync_page = block_sync_page, | ||
190 | .write_begin = bfs_write_begin, | 189 | .write_begin = bfs_write_begin, |
191 | .write_end = generic_write_end, | 190 | .write_end = generic_write_end, |
192 | .bmap = bfs_bmap, | 191 | .bmap = bfs_bmap, |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 4fb8a3431531..fffc2c672396 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1520,7 +1520,6 @@ static int blkdev_releasepage(struct page *page, gfp_t wait) | |||
1520 | static const struct address_space_operations def_blk_aops = { | 1520 | static const struct address_space_operations def_blk_aops = { |
1521 | .readpage = blkdev_readpage, | 1521 | .readpage = blkdev_readpage, |
1522 | .writepage = blkdev_writepage, | 1522 | .writepage = blkdev_writepage, |
1523 | .sync_page = block_sync_page, | ||
1524 | .write_begin = blkdev_write_begin, | 1523 | .write_begin = blkdev_write_begin, |
1525 | .write_end = blkdev_write_end, | 1524 | .write_end = blkdev_write_end, |
1526 | .writepages = generic_writepages, | 1525 | .writepages = generic_writepages, |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index e1aa8d607bc7..ada1f6bd0a57 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -847,7 +847,6 @@ static const struct address_space_operations btree_aops = { | |||
847 | .writepages = btree_writepages, | 847 | .writepages = btree_writepages, |
848 | .releasepage = btree_releasepage, | 848 | .releasepage = btree_releasepage, |
849 | .invalidatepage = btree_invalidatepage, | 849 | .invalidatepage = btree_invalidatepage, |
850 | .sync_page = block_sync_page, | ||
851 | #ifdef CONFIG_MIGRATION | 850 | #ifdef CONFIG_MIGRATION |
852 | .migratepage = btree_migratepage, | 851 | .migratepage = btree_migratepage, |
853 | #endif | 852 | #endif |
@@ -1331,82 +1330,6 @@ static int btrfs_congested_fn(void *congested_data, int bdi_bits) | |||
1331 | } | 1330 | } |
1332 | 1331 | ||
1333 | /* | 1332 | /* |
1334 | * this unplugs every device on the box, and it is only used when page | ||
1335 | * is null | ||
1336 | */ | ||
1337 | static void __unplug_io_fn(struct backing_dev_info *bdi, struct page *page) | ||
1338 | { | ||
1339 | struct btrfs_device *device; | ||
1340 | struct btrfs_fs_info *info; | ||
1341 | |||
1342 | info = (struct btrfs_fs_info *)bdi->unplug_io_data; | ||
1343 | list_for_each_entry(device, &info->fs_devices->devices, dev_list) { | ||
1344 | if (!device->bdev) | ||
1345 | continue; | ||
1346 | |||
1347 | bdi = blk_get_backing_dev_info(device->bdev); | ||
1348 | if (bdi->unplug_io_fn) | ||
1349 | bdi->unplug_io_fn(bdi, page); | ||
1350 | } | ||
1351 | } | ||
1352 | |||
1353 | static void btrfs_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) | ||
1354 | { | ||
1355 | struct inode *inode; | ||
1356 | struct extent_map_tree *em_tree; | ||
1357 | struct extent_map *em; | ||
1358 | struct address_space *mapping; | ||
1359 | u64 offset; | ||
1360 | |||
1361 | /* the generic O_DIRECT read code does this */ | ||
1362 | if (1 || !page) { | ||
1363 | __unplug_io_fn(bdi, page); | ||
1364 | return; | ||
1365 | } | ||
1366 | |||
1367 | /* | ||
1368 | * page->mapping may change at any time. Get a consistent copy | ||
1369 | * and use that for everything below | ||
1370 | */ | ||
1371 | smp_mb(); | ||
1372 | mapping = page->mapping; | ||
1373 | if (!mapping) | ||
1374 | return; | ||
1375 | |||
1376 | inode = mapping->host; | ||
1377 | |||
1378 | /* | ||
1379 | * don't do the expensive searching for a small number of | ||
1380 | * devices | ||
1381 | */ | ||
1382 | if (BTRFS_I(inode)->root->fs_info->fs_devices->open_devices <= 2) { | ||
1383 | __unplug_io_fn(bdi, page); | ||
1384 | return; | ||
1385 | } | ||
1386 | |||
1387 | offset = page_offset(page); | ||
1388 | |||
1389 | em_tree = &BTRFS_I(inode)->extent_tree; | ||
1390 | read_lock(&em_tree->lock); | ||
1391 | em = lookup_extent_mapping(em_tree, offset, PAGE_CACHE_SIZE); | ||
1392 | read_unlock(&em_tree->lock); | ||
1393 | if (!em) { | ||
1394 | __unplug_io_fn(bdi, page); | ||
1395 | return; | ||
1396 | } | ||
1397 | |||
1398 | if (em->block_start >= EXTENT_MAP_LAST_BYTE) { | ||
1399 | free_extent_map(em); | ||
1400 | __unplug_io_fn(bdi, page); | ||
1401 | return; | ||
1402 | } | ||
1403 | offset = offset - em->start; | ||
1404 | btrfs_unplug_page(&BTRFS_I(inode)->root->fs_info->mapping_tree, | ||
1405 | em->block_start + offset, page); | ||
1406 | free_extent_map(em); | ||
1407 | } | ||
1408 | |||
1409 | /* | ||
1410 | * If this fails, caller must call bdi_destroy() to get rid of the | 1333 | * If this fails, caller must call bdi_destroy() to get rid of the |
1411 | * bdi again. | 1334 | * bdi again. |
1412 | */ | 1335 | */ |
@@ -1420,8 +1343,6 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) | |||
1420 | return err; | 1343 | return err; |
1421 | 1344 | ||
1422 | bdi->ra_pages = default_backing_dev_info.ra_pages; | 1345 | bdi->ra_pages = default_backing_dev_info.ra_pages; |
1423 | bdi->unplug_io_fn = btrfs_unplug_io_fn; | ||
1424 | bdi->unplug_io_data = info; | ||
1425 | bdi->congested_fn = btrfs_congested_fn; | 1346 | bdi->congested_fn = btrfs_congested_fn; |
1426 | bdi->congested_data = info; | 1347 | bdi->congested_data = info; |
1427 | return 0; | 1348 | return 0; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index fb9bd7832b6d..462e08e724b0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -7218,7 +7218,6 @@ static const struct address_space_operations btrfs_aops = { | |||
7218 | .writepage = btrfs_writepage, | 7218 | .writepage = btrfs_writepage, |
7219 | .writepages = btrfs_writepages, | 7219 | .writepages = btrfs_writepages, |
7220 | .readpages = btrfs_readpages, | 7220 | .readpages = btrfs_readpages, |
7221 | .sync_page = block_sync_page, | ||
7222 | .direct_IO = btrfs_direct_IO, | 7221 | .direct_IO = btrfs_direct_IO, |
7223 | .invalidatepage = btrfs_invalidatepage, | 7222 | .invalidatepage = btrfs_invalidatepage, |
7224 | .releasepage = btrfs_releasepage, | 7223 | .releasepage = btrfs_releasepage, |
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index af7dbca15276..6e0e82a1b188 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -162,7 +162,6 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) | |||
162 | struct bio *cur; | 162 | struct bio *cur; |
163 | int again = 0; | 163 | int again = 0; |
164 | unsigned long num_run; | 164 | unsigned long num_run; |
165 | unsigned long num_sync_run; | ||
166 | unsigned long batch_run = 0; | 165 | unsigned long batch_run = 0; |
167 | unsigned long limit; | 166 | unsigned long limit; |
168 | unsigned long last_waited = 0; | 167 | unsigned long last_waited = 0; |
@@ -173,11 +172,6 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) | |||
173 | limit = btrfs_async_submit_limit(fs_info); | 172 | limit = btrfs_async_submit_limit(fs_info); |
174 | limit = limit * 2 / 3; | 173 | limit = limit * 2 / 3; |
175 | 174 | ||
176 | /* we want to make sure that every time we switch from the sync | ||
177 | * list to the normal list, we unplug | ||
178 | */ | ||
179 | num_sync_run = 0; | ||
180 | |||
181 | loop: | 175 | loop: |
182 | spin_lock(&device->io_lock); | 176 | spin_lock(&device->io_lock); |
183 | 177 | ||
@@ -223,15 +217,6 @@ loop_lock: | |||
223 | 217 | ||
224 | spin_unlock(&device->io_lock); | 218 | spin_unlock(&device->io_lock); |
225 | 219 | ||
226 | /* | ||
227 | * if we're doing the regular priority list, make sure we unplug | ||
228 | * for any high prio bios we've sent down | ||
229 | */ | ||
230 | if (pending_bios == &device->pending_bios && num_sync_run > 0) { | ||
231 | num_sync_run = 0; | ||
232 | blk_run_backing_dev(bdi, NULL); | ||
233 | } | ||
234 | |||
235 | while (pending) { | 220 | while (pending) { |
236 | 221 | ||
237 | rmb(); | 222 | rmb(); |
@@ -259,19 +244,11 @@ loop_lock: | |||
259 | 244 | ||
260 | BUG_ON(atomic_read(&cur->bi_cnt) == 0); | 245 | BUG_ON(atomic_read(&cur->bi_cnt) == 0); |
261 | 246 | ||
262 | if (cur->bi_rw & REQ_SYNC) | ||
263 | num_sync_run++; | ||
264 | |||
265 | submit_bio(cur->bi_rw, cur); | 247 | submit_bio(cur->bi_rw, cur); |
266 | num_run++; | 248 | num_run++; |
267 | batch_run++; | 249 | batch_run++; |
268 | if (need_resched()) { | 250 | if (need_resched()) |
269 | if (num_sync_run) { | ||
270 | blk_run_backing_dev(bdi, NULL); | ||
271 | num_sync_run = 0; | ||
272 | } | ||
273 | cond_resched(); | 251 | cond_resched(); |
274 | } | ||
275 | 252 | ||
276 | /* | 253 | /* |
277 | * we made progress, there is more work to do and the bdi | 254 | * we made progress, there is more work to do and the bdi |
@@ -304,13 +281,8 @@ loop_lock: | |||
304 | * against it before looping | 281 | * against it before looping |
305 | */ | 282 | */ |
306 | last_waited = ioc->last_waited; | 283 | last_waited = ioc->last_waited; |
307 | if (need_resched()) { | 284 | if (need_resched()) |
308 | if (num_sync_run) { | ||
309 | blk_run_backing_dev(bdi, NULL); | ||
310 | num_sync_run = 0; | ||
311 | } | ||
312 | cond_resched(); | 285 | cond_resched(); |
313 | } | ||
314 | continue; | 286 | continue; |
315 | } | 287 | } |
316 | spin_lock(&device->io_lock); | 288 | spin_lock(&device->io_lock); |
@@ -323,22 +295,6 @@ loop_lock: | |||
323 | } | 295 | } |
324 | } | 296 | } |
325 | 297 | ||
326 | if (num_sync_run) { | ||
327 | num_sync_run = 0; | ||
328 | blk_run_backing_dev(bdi, NULL); | ||
329 | } | ||
330 | /* | ||
331 | * IO has already been through a long path to get here. Checksumming, | ||
332 | * async helper threads, perhaps compression. We've done a pretty | ||
333 | * good job of collecting a batch of IO and should just unplug | ||
334 | * the device right away. | ||
335 | * | ||
336 | * This will help anyone who is waiting on the IO, they might have | ||
337 | * already unplugged, but managed to do so before the bio they | ||
338 | * cared about found its way down here. | ||
339 | */ | ||
340 | blk_run_backing_dev(bdi, NULL); | ||
341 | |||
342 | cond_resched(); | 298 | cond_resched(); |
343 | if (again) | 299 | if (again) |
344 | goto loop; | 300 | goto loop; |
@@ -2948,7 +2904,7 @@ static int find_live_mirror(struct map_lookup *map, int first, int num, | |||
2948 | static int __btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, | 2904 | static int __btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, |
2949 | u64 logical, u64 *length, | 2905 | u64 logical, u64 *length, |
2950 | struct btrfs_multi_bio **multi_ret, | 2906 | struct btrfs_multi_bio **multi_ret, |
2951 | int mirror_num, struct page *unplug_page) | 2907 | int mirror_num) |
2952 | { | 2908 | { |
2953 | struct extent_map *em; | 2909 | struct extent_map *em; |
2954 | struct map_lookup *map; | 2910 | struct map_lookup *map; |
@@ -2980,11 +2936,6 @@ again: | |||
2980 | em = lookup_extent_mapping(em_tree, logical, *length); | 2936 | em = lookup_extent_mapping(em_tree, logical, *length); |
2981 | read_unlock(&em_tree->lock); | 2937 | read_unlock(&em_tree->lock); |
2982 | 2938 | ||
2983 | if (!em && unplug_page) { | ||
2984 | kfree(multi); | ||
2985 | return 0; | ||
2986 | } | ||
2987 | |||
2988 | if (!em) { | 2939 | if (!em) { |
2989 | printk(KERN_CRIT "unable to find logical %llu len %llu\n", | 2940 | printk(KERN_CRIT "unable to find logical %llu len %llu\n", |
2990 | (unsigned long long)logical, | 2941 | (unsigned long long)logical, |
@@ -3040,13 +2991,13 @@ again: | |||
3040 | *length = em->len - offset; | 2991 | *length = em->len - offset; |
3041 | } | 2992 | } |
3042 | 2993 | ||
3043 | if (!multi_ret && !unplug_page) | 2994 | if (!multi_ret) |
3044 | goto out; | 2995 | goto out; |
3045 | 2996 | ||
3046 | num_stripes = 1; | 2997 | num_stripes = 1; |
3047 | stripe_index = 0; | 2998 | stripe_index = 0; |
3048 | if (map->type & BTRFS_BLOCK_GROUP_RAID1) { | 2999 | if (map->type & BTRFS_BLOCK_GROUP_RAID1) { |
3049 | if (unplug_page || (rw & REQ_WRITE)) | 3000 | if (rw & REQ_WRITE) |
3050 | num_stripes = map->num_stripes; | 3001 | num_stripes = map->num_stripes; |
3051 | else if (mirror_num) | 3002 | else if (mirror_num) |
3052 | stripe_index = mirror_num - 1; | 3003 | stripe_index = mirror_num - 1; |
@@ -3068,7 +3019,7 @@ again: | |||
3068 | stripe_index = do_div(stripe_nr, factor); | 3019 | stripe_index = do_div(stripe_nr, factor); |
3069 | stripe_index *= map->sub_stripes; | 3020 | stripe_index *= map->sub_stripes; |
3070 | 3021 | ||
3071 | if (unplug_page || (rw & REQ_WRITE)) | 3022 | if (rw & REQ_WRITE) |
3072 | num_stripes = map->sub_stripes; | 3023 | num_stripes = map->sub_stripes; |
3073 | else if (mirror_num) | 3024 | else if (mirror_num) |
3074 | stripe_index += mirror_num - 1; | 3025 | stripe_index += mirror_num - 1; |
@@ -3088,22 +3039,10 @@ again: | |||
3088 | BUG_ON(stripe_index >= map->num_stripes); | 3039 | BUG_ON(stripe_index >= map->num_stripes); |
3089 | 3040 | ||
3090 | for (i = 0; i < num_stripes; i++) { | 3041 | for (i = 0; i < num_stripes; i++) { |
3091 | if (unplug_page) { | 3042 | multi->stripes[i].physical = |
3092 | struct btrfs_device *device; | 3043 | map->stripes[stripe_index].physical + |
3093 | struct backing_dev_info *bdi; | 3044 | stripe_offset + stripe_nr * map->stripe_len; |
3094 | 3045 | multi->stripes[i].dev = map->stripes[stripe_index].dev; | |
3095 | device = map->stripes[stripe_index].dev; | ||
3096 | if (device->bdev) { | ||
3097 | bdi = blk_get_backing_dev_info(device->bdev); | ||
3098 | if (bdi->unplug_io_fn) | ||
3099 | bdi->unplug_io_fn(bdi, unplug_page); | ||
3100 | } | ||
3101 | } else { | ||
3102 | multi->stripes[i].physical = | ||
3103 | map->stripes[stripe_index].physical + | ||
3104 | stripe_offset + stripe_nr * map->stripe_len; | ||
3105 | multi->stripes[i].dev = map->stripes[stripe_index].dev; | ||
3106 | } | ||
3107 | stripe_index++; | 3046 | stripe_index++; |
3108 | } | 3047 | } |
3109 | if (multi_ret) { | 3048 | if (multi_ret) { |
@@ -3121,7 +3060,7 @@ int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, | |||
3121 | struct btrfs_multi_bio **multi_ret, int mirror_num) | 3060 | struct btrfs_multi_bio **multi_ret, int mirror_num) |
3122 | { | 3061 | { |
3123 | return __btrfs_map_block(map_tree, rw, logical, length, multi_ret, | 3062 | return __btrfs_map_block(map_tree, rw, logical, length, multi_ret, |
3124 | mirror_num, NULL); | 3063 | mirror_num); |
3125 | } | 3064 | } |
3126 | 3065 | ||
3127 | int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, | 3066 | int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, |
@@ -3189,14 +3128,6 @@ int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, | |||
3189 | return 0; | 3128 | return 0; |
3190 | } | 3129 | } |
3191 | 3130 | ||
3192 | int btrfs_unplug_page(struct btrfs_mapping_tree *map_tree, | ||
3193 | u64 logical, struct page *page) | ||
3194 | { | ||
3195 | u64 length = PAGE_CACHE_SIZE; | ||
3196 | return __btrfs_map_block(map_tree, READ, logical, &length, | ||
3197 | NULL, 0, page); | ||
3198 | } | ||
3199 | |||
3200 | static void end_bio_multi_stripe(struct bio *bio, int err) | 3131 | static void end_bio_multi_stripe(struct bio *bio, int err) |
3201 | { | 3132 | { |
3202 | struct btrfs_multi_bio *multi = bio->bi_private; | 3133 | struct btrfs_multi_bio *multi = bio->bi_private; |
diff --git a/fs/buffer.c b/fs/buffer.c index 2219a76e2caf..f903f2e5b4fe 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -54,23 +54,15 @@ init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private) | |||
54 | } | 54 | } |
55 | EXPORT_SYMBOL(init_buffer); | 55 | EXPORT_SYMBOL(init_buffer); |
56 | 56 | ||
57 | static int sync_buffer(void *word) | 57 | static int sleep_on_buffer(void *word) |
58 | { | 58 | { |
59 | struct block_device *bd; | ||
60 | struct buffer_head *bh | ||
61 | = container_of(word, struct buffer_head, b_state); | ||
62 | |||
63 | smp_mb(); | ||
64 | bd = bh->b_bdev; | ||
65 | if (bd) | ||
66 | blk_run_address_space(bd->bd_inode->i_mapping); | ||
67 | io_schedule(); | 59 | io_schedule(); |
68 | return 0; | 60 | return 0; |
69 | } | 61 | } |
70 | 62 | ||
71 | void __lock_buffer(struct buffer_head *bh) | 63 | void __lock_buffer(struct buffer_head *bh) |
72 | { | 64 | { |
73 | wait_on_bit_lock(&bh->b_state, BH_Lock, sync_buffer, | 65 | wait_on_bit_lock(&bh->b_state, BH_Lock, sleep_on_buffer, |
74 | TASK_UNINTERRUPTIBLE); | 66 | TASK_UNINTERRUPTIBLE); |
75 | } | 67 | } |
76 | EXPORT_SYMBOL(__lock_buffer); | 68 | EXPORT_SYMBOL(__lock_buffer); |
@@ -90,7 +82,7 @@ EXPORT_SYMBOL(unlock_buffer); | |||
90 | */ | 82 | */ |
91 | void __wait_on_buffer(struct buffer_head * bh) | 83 | void __wait_on_buffer(struct buffer_head * bh) |
92 | { | 84 | { |
93 | wait_on_bit(&bh->b_state, BH_Lock, sync_buffer, TASK_UNINTERRUPTIBLE); | 85 | wait_on_bit(&bh->b_state, BH_Lock, sleep_on_buffer, TASK_UNINTERRUPTIBLE); |
94 | } | 86 | } |
95 | EXPORT_SYMBOL(__wait_on_buffer); | 87 | EXPORT_SYMBOL(__wait_on_buffer); |
96 | 88 | ||
@@ -749,7 +741,7 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list) | |||
749 | { | 741 | { |
750 | struct buffer_head *bh; | 742 | struct buffer_head *bh; |
751 | struct list_head tmp; | 743 | struct list_head tmp; |
752 | struct address_space *mapping, *prev_mapping = NULL; | 744 | struct address_space *mapping; |
753 | int err = 0, err2; | 745 | int err = 0, err2; |
754 | 746 | ||
755 | INIT_LIST_HEAD(&tmp); | 747 | INIT_LIST_HEAD(&tmp); |
@@ -783,10 +775,6 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list) | |||
783 | * wait_on_buffer() will do that for us | 775 | * wait_on_buffer() will do that for us |
784 | * through sync_buffer(). | 776 | * through sync_buffer(). |
785 | */ | 777 | */ |
786 | if (prev_mapping && prev_mapping != mapping) | ||
787 | blk_run_address_space(prev_mapping); | ||
788 | prev_mapping = mapping; | ||
789 | |||
790 | brelse(bh); | 778 | brelse(bh); |
791 | spin_lock(lock); | 779 | spin_lock(lock); |
792 | } | 780 | } |
@@ -3138,17 +3126,6 @@ out: | |||
3138 | } | 3126 | } |
3139 | EXPORT_SYMBOL(try_to_free_buffers); | 3127 | EXPORT_SYMBOL(try_to_free_buffers); |
3140 | 3128 | ||
3141 | void block_sync_page(struct page *page) | ||
3142 | { | ||
3143 | struct address_space *mapping; | ||
3144 | |||
3145 | smp_mb(); | ||
3146 | mapping = page_mapping(page); | ||
3147 | if (mapping) | ||
3148 | blk_run_backing_dev(mapping->backing_dev_info, page); | ||
3149 | } | ||
3150 | EXPORT_SYMBOL(block_sync_page); | ||
3151 | |||
3152 | /* | 3129 | /* |
3153 | * There are no bdflush tunables left. But distributions are | 3130 | * There are no bdflush tunables left. But distributions are |
3154 | * still running obsolete flush daemons, so we terminate them here. | 3131 | * still running obsolete flush daemons, so we terminate them here. |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index e964b1cd5dd0..c27d236738fc 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1569,34 +1569,6 @@ int cifs_fsync(struct file *file, int datasync) | |||
1569 | return rc; | 1569 | return rc; |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | /* static void cifs_sync_page(struct page *page) | ||
1573 | { | ||
1574 | struct address_space *mapping; | ||
1575 | struct inode *inode; | ||
1576 | unsigned long index = page->index; | ||
1577 | unsigned int rpages = 0; | ||
1578 | int rc = 0; | ||
1579 | |||
1580 | cFYI(1, "sync page %p", page); | ||
1581 | mapping = page->mapping; | ||
1582 | if (!mapping) | ||
1583 | return 0; | ||
1584 | inode = mapping->host; | ||
1585 | if (!inode) | ||
1586 | return; */ | ||
1587 | |||
1588 | /* fill in rpages then | ||
1589 | result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ | ||
1590 | |||
1591 | /* cFYI(1, "rpages is %d for sync page of Index %ld", rpages, index); | ||
1592 | |||
1593 | #if 0 | ||
1594 | if (rc < 0) | ||
1595 | return rc; | ||
1596 | return 0; | ||
1597 | #endif | ||
1598 | } */ | ||
1599 | |||
1600 | /* | 1572 | /* |
1601 | * As file closes, flush all cached write data for this inode checking | 1573 | * As file closes, flush all cached write data for this inode checking |
1602 | * for write behind errors. | 1574 | * for write behind errors. |
@@ -2510,7 +2482,6 @@ const struct address_space_operations cifs_addr_ops = { | |||
2510 | .set_page_dirty = __set_page_dirty_nobuffers, | 2482 | .set_page_dirty = __set_page_dirty_nobuffers, |
2511 | .releasepage = cifs_release_page, | 2483 | .releasepage = cifs_release_page, |
2512 | .invalidatepage = cifs_invalidate_page, | 2484 | .invalidatepage = cifs_invalidate_page, |
2513 | /* .sync_page = cifs_sync_page, */ | ||
2514 | /* .direct_IO = */ | 2485 | /* .direct_IO = */ |
2515 | }; | 2486 | }; |
2516 | 2487 | ||
@@ -2528,6 +2499,5 @@ const struct address_space_operations cifs_addr_ops_smallbuf = { | |||
2528 | .set_page_dirty = __set_page_dirty_nobuffers, | 2499 | .set_page_dirty = __set_page_dirty_nobuffers, |
2529 | .releasepage = cifs_release_page, | 2500 | .releasepage = cifs_release_page, |
2530 | .invalidatepage = cifs_invalidate_page, | 2501 | .invalidatepage = cifs_invalidate_page, |
2531 | /* .sync_page = cifs_sync_page, */ | ||
2532 | /* .direct_IO = */ | 2502 | /* .direct_IO = */ |
2533 | }; | 2503 | }; |
diff --git a/fs/direct-io.c b/fs/direct-io.c index b044705eedd4..df709b3b860a 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -1110,11 +1110,8 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode, | |||
1110 | ((rw & READ) || (dio->result == dio->size))) | 1110 | ((rw & READ) || (dio->result == dio->size))) |
1111 | ret = -EIOCBQUEUED; | 1111 | ret = -EIOCBQUEUED; |
1112 | 1112 | ||
1113 | if (ret != -EIOCBQUEUED) { | 1113 | if (ret != -EIOCBQUEUED) |
1114 | /* All IO is now issued, send it on its way */ | ||
1115 | blk_run_address_space(inode->i_mapping); | ||
1116 | dio_await_completion(dio); | 1114 | dio_await_completion(dio); |
1117 | } | ||
1118 | 1115 | ||
1119 | /* | 1116 | /* |
1120 | * Sync will always be dropping the final ref and completing the | 1117 | * Sync will always be dropping the final ref and completing the |
diff --git a/fs/efs/inode.c b/fs/efs/inode.c index a8e7797b9477..9c13412e6c99 100644 --- a/fs/efs/inode.c +++ b/fs/efs/inode.c | |||
@@ -23,7 +23,6 @@ static sector_t _efs_bmap(struct address_space *mapping, sector_t block) | |||
23 | } | 23 | } |
24 | static const struct address_space_operations efs_aops = { | 24 | static const struct address_space_operations efs_aops = { |
25 | .readpage = efs_readpage, | 25 | .readpage = efs_readpage, |
26 | .sync_page = block_sync_page, | ||
27 | .bmap = _efs_bmap | 26 | .bmap = _efs_bmap |
28 | }; | 27 | }; |
29 | 28 | ||
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index a7555238c41a..82b94c8f5d22 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
@@ -795,7 +795,6 @@ const struct address_space_operations exofs_aops = { | |||
795 | .direct_IO = NULL, /* TODO: Should be trivial to do */ | 795 | .direct_IO = NULL, /* TODO: Should be trivial to do */ |
796 | 796 | ||
797 | /* With these NULL has special meaning or default is not exported */ | 797 | /* With these NULL has special meaning or default is not exported */ |
798 | .sync_page = NULL, | ||
799 | .get_xip_mem = NULL, | 798 | .get_xip_mem = NULL, |
800 | .migratepage = NULL, | 799 | .migratepage = NULL, |
801 | .launder_page = NULL, | 800 | .launder_page = NULL, |
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 40ad210a5049..c47f706878b5 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -860,7 +860,6 @@ const struct address_space_operations ext2_aops = { | |||
860 | .readpage = ext2_readpage, | 860 | .readpage = ext2_readpage, |
861 | .readpages = ext2_readpages, | 861 | .readpages = ext2_readpages, |
862 | .writepage = ext2_writepage, | 862 | .writepage = ext2_writepage, |
863 | .sync_page = block_sync_page, | ||
864 | .write_begin = ext2_write_begin, | 863 | .write_begin = ext2_write_begin, |
865 | .write_end = ext2_write_end, | 864 | .write_end = ext2_write_end, |
866 | .bmap = ext2_bmap, | 865 | .bmap = ext2_bmap, |
@@ -880,7 +879,6 @@ const struct address_space_operations ext2_nobh_aops = { | |||
880 | .readpage = ext2_readpage, | 879 | .readpage = ext2_readpage, |
881 | .readpages = ext2_readpages, | 880 | .readpages = ext2_readpages, |
882 | .writepage = ext2_nobh_writepage, | 881 | .writepage = ext2_nobh_writepage, |
883 | .sync_page = block_sync_page, | ||
884 | .write_begin = ext2_nobh_write_begin, | 882 | .write_begin = ext2_nobh_write_begin, |
885 | .write_end = nobh_write_end, | 883 | .write_end = nobh_write_end, |
886 | .bmap = ext2_bmap, | 884 | .bmap = ext2_bmap, |
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index ae94f6d949f5..fe2541d250e4 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1894,7 +1894,6 @@ static const struct address_space_operations ext3_ordered_aops = { | |||
1894 | .readpage = ext3_readpage, | 1894 | .readpage = ext3_readpage, |
1895 | .readpages = ext3_readpages, | 1895 | .readpages = ext3_readpages, |
1896 | .writepage = ext3_ordered_writepage, | 1896 | .writepage = ext3_ordered_writepage, |
1897 | .sync_page = block_sync_page, | ||
1898 | .write_begin = ext3_write_begin, | 1897 | .write_begin = ext3_write_begin, |
1899 | .write_end = ext3_ordered_write_end, | 1898 | .write_end = ext3_ordered_write_end, |
1900 | .bmap = ext3_bmap, | 1899 | .bmap = ext3_bmap, |
@@ -1910,7 +1909,6 @@ static const struct address_space_operations ext3_writeback_aops = { | |||
1910 | .readpage = ext3_readpage, | 1909 | .readpage = ext3_readpage, |
1911 | .readpages = ext3_readpages, | 1910 | .readpages = ext3_readpages, |
1912 | .writepage = ext3_writeback_writepage, | 1911 | .writepage = ext3_writeback_writepage, |
1913 | .sync_page = block_sync_page, | ||
1914 | .write_begin = ext3_write_begin, | 1912 | .write_begin = ext3_write_begin, |
1915 | .write_end = ext3_writeback_write_end, | 1913 | .write_end = ext3_writeback_write_end, |
1916 | .bmap = ext3_bmap, | 1914 | .bmap = ext3_bmap, |
@@ -1926,7 +1924,6 @@ static const struct address_space_operations ext3_journalled_aops = { | |||
1926 | .readpage = ext3_readpage, | 1924 | .readpage = ext3_readpage, |
1927 | .readpages = ext3_readpages, | 1925 | .readpages = ext3_readpages, |
1928 | .writepage = ext3_journalled_writepage, | 1926 | .writepage = ext3_journalled_writepage, |
1929 | .sync_page = block_sync_page, | ||
1930 | .write_begin = ext3_write_begin, | 1927 | .write_begin = ext3_write_begin, |
1931 | .write_end = ext3_journalled_write_end, | 1928 | .write_end = ext3_journalled_write_end, |
1932 | .set_page_dirty = ext3_journalled_set_page_dirty, | 1929 | .set_page_dirty = ext3_journalled_set_page_dirty, |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 9f7f9e49914f..9297ad46c465 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3903,7 +3903,6 @@ static const struct address_space_operations ext4_ordered_aops = { | |||
3903 | .readpage = ext4_readpage, | 3903 | .readpage = ext4_readpage, |
3904 | .readpages = ext4_readpages, | 3904 | .readpages = ext4_readpages, |
3905 | .writepage = ext4_writepage, | 3905 | .writepage = ext4_writepage, |
3906 | .sync_page = block_sync_page, | ||
3907 | .write_begin = ext4_write_begin, | 3906 | .write_begin = ext4_write_begin, |
3908 | .write_end = ext4_ordered_write_end, | 3907 | .write_end = ext4_ordered_write_end, |
3909 | .bmap = ext4_bmap, | 3908 | .bmap = ext4_bmap, |
@@ -3919,7 +3918,6 @@ static const struct address_space_operations ext4_writeback_aops = { | |||
3919 | .readpage = ext4_readpage, | 3918 | .readpage = ext4_readpage, |
3920 | .readpages = ext4_readpages, | 3919 | .readpages = ext4_readpages, |
3921 | .writepage = ext4_writepage, | 3920 | .writepage = ext4_writepage, |
3922 | .sync_page = block_sync_page, | ||
3923 | .write_begin = ext4_write_begin, | 3921 | .write_begin = ext4_write_begin, |
3924 | .write_end = ext4_writeback_write_end, | 3922 | .write_end = ext4_writeback_write_end, |
3925 | .bmap = ext4_bmap, | 3923 | .bmap = ext4_bmap, |
@@ -3935,7 +3933,6 @@ static const struct address_space_operations ext4_journalled_aops = { | |||
3935 | .readpage = ext4_readpage, | 3933 | .readpage = ext4_readpage, |
3936 | .readpages = ext4_readpages, | 3934 | .readpages = ext4_readpages, |
3937 | .writepage = ext4_writepage, | 3935 | .writepage = ext4_writepage, |
3938 | .sync_page = block_sync_page, | ||
3939 | .write_begin = ext4_write_begin, | 3936 | .write_begin = ext4_write_begin, |
3940 | .write_end = ext4_journalled_write_end, | 3937 | .write_end = ext4_journalled_write_end, |
3941 | .set_page_dirty = ext4_journalled_set_page_dirty, | 3938 | .set_page_dirty = ext4_journalled_set_page_dirty, |
@@ -3951,7 +3948,6 @@ static const struct address_space_operations ext4_da_aops = { | |||
3951 | .readpages = ext4_readpages, | 3948 | .readpages = ext4_readpages, |
3952 | .writepage = ext4_writepage, | 3949 | .writepage = ext4_writepage, |
3953 | .writepages = ext4_da_writepages, | 3950 | .writepages = ext4_da_writepages, |
3954 | .sync_page = block_sync_page, | ||
3955 | .write_begin = ext4_da_write_begin, | 3951 | .write_begin = ext4_da_write_begin, |
3956 | .write_end = ext4_da_write_end, | 3952 | .write_end = ext4_da_write_end, |
3957 | .bmap = ext4_bmap, | 3953 | .bmap = ext4_bmap, |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 86753fe10bd1..f4ff09fb79b1 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -236,7 +236,6 @@ static const struct address_space_operations fat_aops = { | |||
236 | .readpages = fat_readpages, | 236 | .readpages = fat_readpages, |
237 | .writepage = fat_writepage, | 237 | .writepage = fat_writepage, |
238 | .writepages = fat_writepages, | 238 | .writepages = fat_writepages, |
239 | .sync_page = block_sync_page, | ||
240 | .write_begin = fat_write_begin, | 239 | .write_begin = fat_write_begin, |
241 | .write_end = fat_write_end, | 240 | .write_end = fat_write_end, |
242 | .direct_IO = fat_direct_IO, | 241 | .direct_IO = fat_direct_IO, |
diff --git a/fs/freevxfs/vxfs_subr.c b/fs/freevxfs/vxfs_subr.c index 1429f3ae1e86..5d318c44f855 100644 --- a/fs/freevxfs/vxfs_subr.c +++ b/fs/freevxfs/vxfs_subr.c | |||
@@ -44,7 +44,6 @@ static sector_t vxfs_bmap(struct address_space *, sector_t); | |||
44 | const struct address_space_operations vxfs_aops = { | 44 | const struct address_space_operations vxfs_aops = { |
45 | .readpage = vxfs_readpage, | 45 | .readpage = vxfs_readpage, |
46 | .bmap = vxfs_bmap, | 46 | .bmap = vxfs_bmap, |
47 | .sync_page = block_sync_page, | ||
48 | }; | 47 | }; |
49 | 48 | ||
50 | inline void | 49 | inline void |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 9e3f68cc1bd1..09e8d51eeb64 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -868,7 +868,6 @@ static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb) | |||
868 | 868 | ||
869 | fc->bdi.name = "fuse"; | 869 | fc->bdi.name = "fuse"; |
870 | fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; | 870 | fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; |
871 | fc->bdi.unplug_io_fn = default_unplug_io_fn; | ||
872 | /* fuse does it's own writeback accounting */ | 871 | /* fuse does it's own writeback accounting */ |
873 | fc->bdi.capabilities = BDI_CAP_NO_ACCT_WB; | 872 | fc->bdi.capabilities = BDI_CAP_NO_ACCT_WB; |
874 | 873 | ||
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 4f36f8832b9b..2f87ad27efd0 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
@@ -1116,7 +1116,6 @@ static const struct address_space_operations gfs2_writeback_aops = { | |||
1116 | .writepages = gfs2_writeback_writepages, | 1116 | .writepages = gfs2_writeback_writepages, |
1117 | .readpage = gfs2_readpage, | 1117 | .readpage = gfs2_readpage, |
1118 | .readpages = gfs2_readpages, | 1118 | .readpages = gfs2_readpages, |
1119 | .sync_page = block_sync_page, | ||
1120 | .write_begin = gfs2_write_begin, | 1119 | .write_begin = gfs2_write_begin, |
1121 | .write_end = gfs2_write_end, | 1120 | .write_end = gfs2_write_end, |
1122 | .bmap = gfs2_bmap, | 1121 | .bmap = gfs2_bmap, |
@@ -1132,7 +1131,6 @@ static const struct address_space_operations gfs2_ordered_aops = { | |||
1132 | .writepage = gfs2_ordered_writepage, | 1131 | .writepage = gfs2_ordered_writepage, |
1133 | .readpage = gfs2_readpage, | 1132 | .readpage = gfs2_readpage, |
1134 | .readpages = gfs2_readpages, | 1133 | .readpages = gfs2_readpages, |
1135 | .sync_page = block_sync_page, | ||
1136 | .write_begin = gfs2_write_begin, | 1134 | .write_begin = gfs2_write_begin, |
1137 | .write_end = gfs2_write_end, | 1135 | .write_end = gfs2_write_end, |
1138 | .set_page_dirty = gfs2_set_page_dirty, | 1136 | .set_page_dirty = gfs2_set_page_dirty, |
@@ -1150,7 +1148,6 @@ static const struct address_space_operations gfs2_jdata_aops = { | |||
1150 | .writepages = gfs2_jdata_writepages, | 1148 | .writepages = gfs2_jdata_writepages, |
1151 | .readpage = gfs2_readpage, | 1149 | .readpage = gfs2_readpage, |
1152 | .readpages = gfs2_readpages, | 1150 | .readpages = gfs2_readpages, |
1153 | .sync_page = block_sync_page, | ||
1154 | .write_begin = gfs2_write_begin, | 1151 | .write_begin = gfs2_write_begin, |
1155 | .write_end = gfs2_write_end, | 1152 | .write_end = gfs2_write_end, |
1156 | .set_page_dirty = gfs2_set_page_dirty, | 1153 | .set_page_dirty = gfs2_set_page_dirty, |
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 939739c7b3f9..a566331db4e1 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -94,7 +94,6 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb | |||
94 | const struct address_space_operations gfs2_meta_aops = { | 94 | const struct address_space_operations gfs2_meta_aops = { |
95 | .writepage = gfs2_aspace_writepage, | 95 | .writepage = gfs2_aspace_writepage, |
96 | .releasepage = gfs2_releasepage, | 96 | .releasepage = gfs2_releasepage, |
97 | .sync_page = block_sync_page, | ||
98 | }; | 97 | }; |
99 | 98 | ||
100 | /** | 99 | /** |
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index dffb4e996643..fff16c968e67 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -150,7 +150,6 @@ static int hfs_writepages(struct address_space *mapping, | |||
150 | const struct address_space_operations hfs_btree_aops = { | 150 | const struct address_space_operations hfs_btree_aops = { |
151 | .readpage = hfs_readpage, | 151 | .readpage = hfs_readpage, |
152 | .writepage = hfs_writepage, | 152 | .writepage = hfs_writepage, |
153 | .sync_page = block_sync_page, | ||
154 | .write_begin = hfs_write_begin, | 153 | .write_begin = hfs_write_begin, |
155 | .write_end = generic_write_end, | 154 | .write_end = generic_write_end, |
156 | .bmap = hfs_bmap, | 155 | .bmap = hfs_bmap, |
@@ -160,7 +159,6 @@ const struct address_space_operations hfs_btree_aops = { | |||
160 | const struct address_space_operations hfs_aops = { | 159 | const struct address_space_operations hfs_aops = { |
161 | .readpage = hfs_readpage, | 160 | .readpage = hfs_readpage, |
162 | .writepage = hfs_writepage, | 161 | .writepage = hfs_writepage, |
163 | .sync_page = block_sync_page, | ||
164 | .write_begin = hfs_write_begin, | 162 | .write_begin = hfs_write_begin, |
165 | .write_end = generic_write_end, | 163 | .write_end = generic_write_end, |
166 | .bmap = hfs_bmap, | 164 | .bmap = hfs_bmap, |
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index a8df651747f0..b248a6cfcad9 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -146,7 +146,6 @@ static int hfsplus_writepages(struct address_space *mapping, | |||
146 | const struct address_space_operations hfsplus_btree_aops = { | 146 | const struct address_space_operations hfsplus_btree_aops = { |
147 | .readpage = hfsplus_readpage, | 147 | .readpage = hfsplus_readpage, |
148 | .writepage = hfsplus_writepage, | 148 | .writepage = hfsplus_writepage, |
149 | .sync_page = block_sync_page, | ||
150 | .write_begin = hfsplus_write_begin, | 149 | .write_begin = hfsplus_write_begin, |
151 | .write_end = generic_write_end, | 150 | .write_end = generic_write_end, |
152 | .bmap = hfsplus_bmap, | 151 | .bmap = hfsplus_bmap, |
@@ -156,7 +155,6 @@ const struct address_space_operations hfsplus_btree_aops = { | |||
156 | const struct address_space_operations hfsplus_aops = { | 155 | const struct address_space_operations hfsplus_aops = { |
157 | .readpage = hfsplus_readpage, | 156 | .readpage = hfsplus_readpage, |
158 | .writepage = hfsplus_writepage, | 157 | .writepage = hfsplus_writepage, |
159 | .sync_page = block_sync_page, | ||
160 | .write_begin = hfsplus_write_begin, | 158 | .write_begin = hfsplus_write_begin, |
161 | .write_end = generic_write_end, | 159 | .write_end = generic_write_end, |
162 | .bmap = hfsplus_bmap, | 160 | .bmap = hfsplus_bmap, |
diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c index c0340887c7ea..9e84257b3ad5 100644 --- a/fs/hpfs/file.c +++ b/fs/hpfs/file.c | |||
@@ -120,7 +120,6 @@ static sector_t _hpfs_bmap(struct address_space *mapping, sector_t block) | |||
120 | const struct address_space_operations hpfs_aops = { | 120 | const struct address_space_operations hpfs_aops = { |
121 | .readpage = hpfs_readpage, | 121 | .readpage = hpfs_readpage, |
122 | .writepage = hpfs_writepage, | 122 | .writepage = hpfs_writepage, |
123 | .sync_page = block_sync_page, | ||
124 | .write_begin = hpfs_write_begin, | 123 | .write_begin = hpfs_write_begin, |
125 | .write_end = generic_write_end, | 124 | .write_end = generic_write_end, |
126 | .bmap = _hpfs_bmap | 125 | .bmap = _hpfs_bmap |
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index a0f3833c0dbf..3db5ba4568fc 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -1158,7 +1158,6 @@ static sector_t _isofs_bmap(struct address_space *mapping, sector_t block) | |||
1158 | 1158 | ||
1159 | static const struct address_space_operations isofs_aops = { | 1159 | static const struct address_space_operations isofs_aops = { |
1160 | .readpage = isofs_readpage, | 1160 | .readpage = isofs_readpage, |
1161 | .sync_page = block_sync_page, | ||
1162 | .bmap = _isofs_bmap | 1161 | .bmap = _isofs_bmap |
1163 | }; | 1162 | }; |
1164 | 1163 | ||
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 9978803ceedc..eddbb373209e 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -352,7 +352,6 @@ const struct address_space_operations jfs_aops = { | |||
352 | .readpages = jfs_readpages, | 352 | .readpages = jfs_readpages, |
353 | .writepage = jfs_writepage, | 353 | .writepage = jfs_writepage, |
354 | .writepages = jfs_writepages, | 354 | .writepages = jfs_writepages, |
355 | .sync_page = block_sync_page, | ||
356 | .write_begin = jfs_write_begin, | 355 | .write_begin = jfs_write_begin, |
357 | .write_end = nobh_write_end, | 356 | .write_end = nobh_write_end, |
358 | .bmap = jfs_bmap, | 357 | .bmap = jfs_bmap, |
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 48b44bd8267b..6740d34cd82b 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -583,7 +583,6 @@ static void metapage_invalidatepage(struct page *page, unsigned long offset) | |||
583 | const struct address_space_operations jfs_metapage_aops = { | 583 | const struct address_space_operations jfs_metapage_aops = { |
584 | .readpage = metapage_readpage, | 584 | .readpage = metapage_readpage, |
585 | .writepage = metapage_writepage, | 585 | .writepage = metapage_writepage, |
586 | .sync_page = block_sync_page, | ||
587 | .releasepage = metapage_releasepage, | 586 | .releasepage = metapage_releasepage, |
588 | .invalidatepage = metapage_invalidatepage, | 587 | .invalidatepage = metapage_invalidatepage, |
589 | .set_page_dirty = __set_page_dirty_nobuffers, | 588 | .set_page_dirty = __set_page_dirty_nobuffers, |
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index 723bc5bca09a..1adc8d455f0e 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c | |||
@@ -39,7 +39,6 @@ static int sync_request(struct page *page, struct block_device *bdev, int rw) | |||
39 | bio.bi_end_io = request_complete; | 39 | bio.bi_end_io = request_complete; |
40 | 40 | ||
41 | submit_bio(rw, &bio); | 41 | submit_bio(rw, &bio); |
42 | generic_unplug_device(bdev_get_queue(bdev)); | ||
43 | wait_for_completion(&complete); | 42 | wait_for_completion(&complete); |
44 | return test_bit(BIO_UPTODATE, &bio.bi_flags) ? 0 : -EIO; | 43 | return test_bit(BIO_UPTODATE, &bio.bi_flags) ? 0 : -EIO; |
45 | } | 44 | } |
@@ -168,7 +167,6 @@ static void bdev_writeseg(struct super_block *sb, u64 ofs, size_t len) | |||
168 | } | 167 | } |
169 | len = PAGE_ALIGN(len); | 168 | len = PAGE_ALIGN(len); |
170 | __bdev_writeseg(sb, ofs, ofs >> PAGE_SHIFT, len >> PAGE_SHIFT); | 169 | __bdev_writeseg(sb, ofs, ofs >> PAGE_SHIFT, len >> PAGE_SHIFT); |
171 | generic_unplug_device(bdev_get_queue(logfs_super(sb)->s_bdev)); | ||
172 | } | 170 | } |
173 | 171 | ||
174 | 172 | ||
diff --git a/fs/minix/inode.c b/fs/minix/inode.c index ae0b83f476a6..adcdc0a4e182 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c | |||
@@ -399,7 +399,6 @@ static sector_t minix_bmap(struct address_space *mapping, sector_t block) | |||
399 | static const struct address_space_operations minix_aops = { | 399 | static const struct address_space_operations minix_aops = { |
400 | .readpage = minix_readpage, | 400 | .readpage = minix_readpage, |
401 | .writepage = minix_writepage, | 401 | .writepage = minix_writepage, |
402 | .sync_page = block_sync_page, | ||
403 | .write_begin = minix_write_begin, | 402 | .write_begin = minix_write_begin, |
404 | .write_end = generic_write_end, | 403 | .write_end = generic_write_end, |
405 | .bmap = minix_bmap | 404 | .bmap = minix_bmap |
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index 388e9e8f5286..f4f1c08807ed 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c | |||
@@ -40,14 +40,10 @@ void nilfs_btnode_cache_init_once(struct address_space *btnc) | |||
40 | nilfs_mapping_init_once(btnc); | 40 | nilfs_mapping_init_once(btnc); |
41 | } | 41 | } |
42 | 42 | ||
43 | static const struct address_space_operations def_btnode_aops = { | ||
44 | .sync_page = block_sync_page, | ||
45 | }; | ||
46 | |||
47 | void nilfs_btnode_cache_init(struct address_space *btnc, | 43 | void nilfs_btnode_cache_init(struct address_space *btnc, |
48 | struct backing_dev_info *bdi) | 44 | struct backing_dev_info *bdi) |
49 | { | 45 | { |
50 | nilfs_mapping_init(btnc, bdi, &def_btnode_aops); | 46 | nilfs_mapping_init(btnc, bdi); |
51 | } | 47 | } |
52 | 48 | ||
53 | void nilfs_btnode_cache_clear(struct address_space *btnc) | 49 | void nilfs_btnode_cache_clear(struct address_space *btnc) |
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index caf9a6a3fb54..1c2a3e23f8b2 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include "ifile.h" | 49 | #include "ifile.h" |
50 | 50 | ||
51 | static const struct address_space_operations def_gcinode_aops = { | 51 | static const struct address_space_operations def_gcinode_aops = { |
52 | .sync_page = block_sync_page, | ||
53 | }; | 52 | }; |
54 | 53 | ||
55 | /* | 54 | /* |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 2fd440d8d6b8..c89d5d1ea7c7 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -262,7 +262,6 @@ nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | |||
262 | const struct address_space_operations nilfs_aops = { | 262 | const struct address_space_operations nilfs_aops = { |
263 | .writepage = nilfs_writepage, | 263 | .writepage = nilfs_writepage, |
264 | .readpage = nilfs_readpage, | 264 | .readpage = nilfs_readpage, |
265 | .sync_page = block_sync_page, | ||
266 | .writepages = nilfs_writepages, | 265 | .writepages = nilfs_writepages, |
267 | .set_page_dirty = nilfs_set_page_dirty, | 266 | .set_page_dirty = nilfs_set_page_dirty, |
268 | .readpages = nilfs_readpages, | 267 | .readpages = nilfs_readpages, |
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index 6a0e2a189f60..3fdb61d79c9a 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c | |||
@@ -399,7 +399,6 @@ nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc) | |||
399 | 399 | ||
400 | static const struct address_space_operations def_mdt_aops = { | 400 | static const struct address_space_operations def_mdt_aops = { |
401 | .writepage = nilfs_mdt_write_page, | 401 | .writepage = nilfs_mdt_write_page, |
402 | .sync_page = block_sync_page, | ||
403 | }; | 402 | }; |
404 | 403 | ||
405 | static const struct inode_operations def_mdt_iops; | 404 | static const struct inode_operations def_mdt_iops; |
@@ -438,10 +437,6 @@ void nilfs_mdt_set_entry_size(struct inode *inode, unsigned entry_size, | |||
438 | mi->mi_first_entry_offset = DIV_ROUND_UP(header_size, entry_size); | 437 | mi->mi_first_entry_offset = DIV_ROUND_UP(header_size, entry_size); |
439 | } | 438 | } |
440 | 439 | ||
441 | static const struct address_space_operations shadow_map_aops = { | ||
442 | .sync_page = block_sync_page, | ||
443 | }; | ||
444 | |||
445 | /** | 440 | /** |
446 | * nilfs_mdt_setup_shadow_map - setup shadow map and bind it to metadata file | 441 | * nilfs_mdt_setup_shadow_map - setup shadow map and bind it to metadata file |
447 | * @inode: inode of the metadata file | 442 | * @inode: inode of the metadata file |
@@ -455,9 +450,9 @@ int nilfs_mdt_setup_shadow_map(struct inode *inode, | |||
455 | 450 | ||
456 | INIT_LIST_HEAD(&shadow->frozen_buffers); | 451 | INIT_LIST_HEAD(&shadow->frozen_buffers); |
457 | nilfs_mapping_init_once(&shadow->frozen_data); | 452 | nilfs_mapping_init_once(&shadow->frozen_data); |
458 | nilfs_mapping_init(&shadow->frozen_data, bdi, &shadow_map_aops); | 453 | nilfs_mapping_init(&shadow->frozen_data, bdi); |
459 | nilfs_mapping_init_once(&shadow->frozen_btnodes); | 454 | nilfs_mapping_init_once(&shadow->frozen_btnodes); |
460 | nilfs_mapping_init(&shadow->frozen_btnodes, bdi, &shadow_map_aops); | 455 | nilfs_mapping_init(&shadow->frozen_btnodes, bdi); |
461 | mi->mi_shadow = shadow; | 456 | mi->mi_shadow = shadow; |
462 | return 0; | 457 | return 0; |
463 | } | 458 | } |
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 0c432416cfef..3da37cc5de34 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -506,15 +506,14 @@ void nilfs_mapping_init_once(struct address_space *mapping) | |||
506 | } | 506 | } |
507 | 507 | ||
508 | void nilfs_mapping_init(struct address_space *mapping, | 508 | void nilfs_mapping_init(struct address_space *mapping, |
509 | struct backing_dev_info *bdi, | 509 | struct backing_dev_info *bdi) |
510 | const struct address_space_operations *aops) | ||
511 | { | 510 | { |
512 | mapping->host = NULL; | 511 | mapping->host = NULL; |
513 | mapping->flags = 0; | 512 | mapping->flags = 0; |
514 | mapping_set_gfp_mask(mapping, GFP_NOFS); | 513 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
515 | mapping->assoc_mapping = NULL; | 514 | mapping->assoc_mapping = NULL; |
516 | mapping->backing_dev_info = bdi; | 515 | mapping->backing_dev_info = bdi; |
517 | mapping->a_ops = aops; | 516 | mapping->a_ops = NULL; |
518 | } | 517 | } |
519 | 518 | ||
520 | /* | 519 | /* |
diff --git a/fs/nilfs2/page.h b/fs/nilfs2/page.h index 622df27cd891..ba4d6fd40b04 100644 --- a/fs/nilfs2/page.h +++ b/fs/nilfs2/page.h | |||
@@ -63,8 +63,7 @@ void nilfs_copy_back_pages(struct address_space *, struct address_space *); | |||
63 | void nilfs_clear_dirty_pages(struct address_space *); | 63 | void nilfs_clear_dirty_pages(struct address_space *); |
64 | void nilfs_mapping_init_once(struct address_space *mapping); | 64 | void nilfs_mapping_init_once(struct address_space *mapping); |
65 | void nilfs_mapping_init(struct address_space *mapping, | 65 | void nilfs_mapping_init(struct address_space *mapping, |
66 | struct backing_dev_info *bdi, | 66 | struct backing_dev_info *bdi); |
67 | const struct address_space_operations *aops); | ||
68 | unsigned nilfs_page_count_clean_buffers(struct page *, unsigned, unsigned); | 67 | unsigned nilfs_page_count_clean_buffers(struct page *, unsigned, unsigned); |
69 | unsigned long nilfs_find_uncommitted_extent(struct inode *inode, | 68 | unsigned long nilfs_find_uncommitted_extent(struct inode *inode, |
70 | sector_t start_blk, | 69 | sector_t start_blk, |
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index c3c2c7ac9020..0b1e885b8cf8 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c | |||
@@ -1543,8 +1543,6 @@ err_out: | |||
1543 | */ | 1543 | */ |
1544 | const struct address_space_operations ntfs_aops = { | 1544 | const struct address_space_operations ntfs_aops = { |
1545 | .readpage = ntfs_readpage, /* Fill page with data. */ | 1545 | .readpage = ntfs_readpage, /* Fill page with data. */ |
1546 | .sync_page = block_sync_page, /* Currently, just unplugs the | ||
1547 | disk request queue. */ | ||
1548 | #ifdef NTFS_RW | 1546 | #ifdef NTFS_RW |
1549 | .writepage = ntfs_writepage, /* Write dirty page to disk. */ | 1547 | .writepage = ntfs_writepage, /* Write dirty page to disk. */ |
1550 | #endif /* NTFS_RW */ | 1548 | #endif /* NTFS_RW */ |
@@ -1560,8 +1558,6 @@ const struct address_space_operations ntfs_aops = { | |||
1560 | */ | 1558 | */ |
1561 | const struct address_space_operations ntfs_mst_aops = { | 1559 | const struct address_space_operations ntfs_mst_aops = { |
1562 | .readpage = ntfs_readpage, /* Fill page with data. */ | 1560 | .readpage = ntfs_readpage, /* Fill page with data. */ |
1563 | .sync_page = block_sync_page, /* Currently, just unplugs the | ||
1564 | disk request queue. */ | ||
1565 | #ifdef NTFS_RW | 1561 | #ifdef NTFS_RW |
1566 | .writepage = ntfs_writepage, /* Write dirty page to disk. */ | 1562 | .writepage = ntfs_writepage, /* Write dirty page to disk. */ |
1567 | .set_page_dirty = __set_page_dirty_nobuffers, /* Set the page dirty | 1563 | .set_page_dirty = __set_page_dirty_nobuffers, /* Set the page dirty |
diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index 6551c7cbad92..ef9ed854255c 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c | |||
@@ -698,8 +698,7 @@ lock_retry_remap: | |||
698 | "uptodate! Unplugging the disk queue " | 698 | "uptodate! Unplugging the disk queue " |
699 | "and rescheduling."); | 699 | "and rescheduling."); |
700 | get_bh(tbh); | 700 | get_bh(tbh); |
701 | blk_run_address_space(mapping); | 701 | io_schedule(); |
702 | schedule(); | ||
703 | put_bh(tbh); | 702 | put_bh(tbh); |
704 | if (unlikely(!buffer_uptodate(tbh))) | 703 | if (unlikely(!buffer_uptodate(tbh))) |
705 | goto read_err; | 704 | goto read_err; |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 1fbb0e20131b..daea0359e974 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -2043,7 +2043,6 @@ const struct address_space_operations ocfs2_aops = { | |||
2043 | .write_begin = ocfs2_write_begin, | 2043 | .write_begin = ocfs2_write_begin, |
2044 | .write_end = ocfs2_write_end, | 2044 | .write_end = ocfs2_write_end, |
2045 | .bmap = ocfs2_bmap, | 2045 | .bmap = ocfs2_bmap, |
2046 | .sync_page = block_sync_page, | ||
2047 | .direct_IO = ocfs2_direct_IO, | 2046 | .direct_IO = ocfs2_direct_IO, |
2048 | .invalidatepage = ocfs2_invalidatepage, | 2047 | .invalidatepage = ocfs2_invalidatepage, |
2049 | .releasepage = ocfs2_releasepage, | 2048 | .releasepage = ocfs2_releasepage, |
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index b108e863d8f6..1adab287bd24 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -367,11 +367,7 @@ static inline void o2hb_bio_wait_dec(struct o2hb_bio_wait_ctxt *wc, | |||
367 | static void o2hb_wait_on_io(struct o2hb_region *reg, | 367 | static void o2hb_wait_on_io(struct o2hb_region *reg, |
368 | struct o2hb_bio_wait_ctxt *wc) | 368 | struct o2hb_bio_wait_ctxt *wc) |
369 | { | 369 | { |
370 | struct address_space *mapping = reg->hr_bdev->bd_inode->i_mapping; | ||
371 | |||
372 | blk_run_address_space(mapping); | ||
373 | o2hb_bio_wait_dec(wc, 1); | 370 | o2hb_bio_wait_dec(wc, 1); |
374 | |||
375 | wait_for_completion(&wc->wc_io_complete); | 371 | wait_for_completion(&wc->wc_io_complete); |
376 | } | 372 | } |
377 | 373 | ||
diff --git a/fs/omfs/file.c b/fs/omfs/file.c index 8a6d34fa668a..d738a7e493dd 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c | |||
@@ -372,7 +372,6 @@ const struct address_space_operations omfs_aops = { | |||
372 | .readpages = omfs_readpages, | 372 | .readpages = omfs_readpages, |
373 | .writepage = omfs_writepage, | 373 | .writepage = omfs_writepage, |
374 | .writepages = omfs_writepages, | 374 | .writepages = omfs_writepages, |
375 | .sync_page = block_sync_page, | ||
376 | .write_begin = omfs_write_begin, | 375 | .write_begin = omfs_write_begin, |
377 | .write_end = generic_write_end, | 376 | .write_end = generic_write_end, |
378 | .bmap = omfs_bmap, | 377 | .bmap = omfs_bmap, |
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index e63b4171d583..2b0646613f5a 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -335,7 +335,6 @@ static sector_t qnx4_bmap(struct address_space *mapping, sector_t block) | |||
335 | static const struct address_space_operations qnx4_aops = { | 335 | static const struct address_space_operations qnx4_aops = { |
336 | .readpage = qnx4_readpage, | 336 | .readpage = qnx4_readpage, |
337 | .writepage = qnx4_writepage, | 337 | .writepage = qnx4_writepage, |
338 | .sync_page = block_sync_page, | ||
339 | .write_begin = qnx4_write_begin, | 338 | .write_begin = qnx4_write_begin, |
340 | .write_end = generic_write_end, | 339 | .write_end = generic_write_end, |
341 | .bmap = qnx4_bmap | 340 | .bmap = qnx4_bmap |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 0bae036831e2..03674675f886 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -3212,7 +3212,6 @@ const struct address_space_operations reiserfs_address_space_operations = { | |||
3212 | .readpages = reiserfs_readpages, | 3212 | .readpages = reiserfs_readpages, |
3213 | .releasepage = reiserfs_releasepage, | 3213 | .releasepage = reiserfs_releasepage, |
3214 | .invalidatepage = reiserfs_invalidatepage, | 3214 | .invalidatepage = reiserfs_invalidatepage, |
3215 | .sync_page = block_sync_page, | ||
3216 | .write_begin = reiserfs_write_begin, | 3215 | .write_begin = reiserfs_write_begin, |
3217 | .write_end = reiserfs_write_end, | 3216 | .write_end = reiserfs_write_end, |
3218 | .bmap = reiserfs_aop_bmap, | 3217 | .bmap = reiserfs_aop_bmap, |
diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c index 9ca66276315e..fa8d43c92bb8 100644 --- a/fs/sysv/itree.c +++ b/fs/sysv/itree.c | |||
@@ -488,7 +488,6 @@ static sector_t sysv_bmap(struct address_space *mapping, sector_t block) | |||
488 | const struct address_space_operations sysv_aops = { | 488 | const struct address_space_operations sysv_aops = { |
489 | .readpage = sysv_readpage, | 489 | .readpage = sysv_readpage, |
490 | .writepage = sysv_writepage, | 490 | .writepage = sysv_writepage, |
491 | .sync_page = block_sync_page, | ||
492 | .write_begin = sysv_write_begin, | 491 | .write_begin = sysv_write_begin, |
493 | .write_end = generic_write_end, | 492 | .write_end = generic_write_end, |
494 | .bmap = sysv_bmap | 493 | .bmap = sysv_bmap |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 6e11c2975dcf..81368d4d4a2c 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -1979,7 +1979,6 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) | |||
1979 | */ | 1979 | */ |
1980 | c->bdi.name = "ubifs", | 1980 | c->bdi.name = "ubifs", |
1981 | c->bdi.capabilities = BDI_CAP_MAP_COPY; | 1981 | c->bdi.capabilities = BDI_CAP_MAP_COPY; |
1982 | c->bdi.unplug_io_fn = default_unplug_io_fn; | ||
1983 | err = bdi_init(&c->bdi); | 1982 | err = bdi_init(&c->bdi); |
1984 | if (err) | 1983 | if (err) |
1985 | goto out_close; | 1984 | goto out_close; |
diff --git a/fs/udf/file.c b/fs/udf/file.c index 89c78486cbbe..94e4553491c9 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -98,7 +98,6 @@ static int udf_adinicb_write_end(struct file *file, | |||
98 | const struct address_space_operations udf_adinicb_aops = { | 98 | const struct address_space_operations udf_adinicb_aops = { |
99 | .readpage = udf_adinicb_readpage, | 99 | .readpage = udf_adinicb_readpage, |
100 | .writepage = udf_adinicb_writepage, | 100 | .writepage = udf_adinicb_writepage, |
101 | .sync_page = block_sync_page, | ||
102 | .write_begin = simple_write_begin, | 101 | .write_begin = simple_write_begin, |
103 | .write_end = udf_adinicb_write_end, | 102 | .write_end = udf_adinicb_write_end, |
104 | }; | 103 | }; |
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index c6a2e782b97b..fa96fc0fe12b 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -133,7 +133,6 @@ static sector_t udf_bmap(struct address_space *mapping, sector_t block) | |||
133 | const struct address_space_operations udf_aops = { | 133 | const struct address_space_operations udf_aops = { |
134 | .readpage = udf_readpage, | 134 | .readpage = udf_readpage, |
135 | .writepage = udf_writepage, | 135 | .writepage = udf_writepage, |
136 | .sync_page = block_sync_page, | ||
137 | .write_begin = udf_write_begin, | 136 | .write_begin = udf_write_begin, |
138 | .write_end = generic_write_end, | 137 | .write_end = generic_write_end, |
139 | .bmap = udf_bmap, | 138 | .bmap = udf_bmap, |
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 2b251f2093af..83b28444eb17 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -588,7 +588,6 @@ static sector_t ufs_bmap(struct address_space *mapping, sector_t block) | |||
588 | const struct address_space_operations ufs_aops = { | 588 | const struct address_space_operations ufs_aops = { |
589 | .readpage = ufs_readpage, | 589 | .readpage = ufs_readpage, |
590 | .writepage = ufs_writepage, | 590 | .writepage = ufs_writepage, |
591 | .sync_page = block_sync_page, | ||
592 | .write_begin = ufs_write_begin, | 591 | .write_begin = ufs_write_begin, |
593 | .write_end = generic_write_end, | 592 | .write_end = generic_write_end, |
594 | .bmap = ufs_bmap | 593 | .bmap = ufs_bmap |
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index a58f9155fc9a..ff0e79276f2d 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c | |||
@@ -481,7 +481,7 @@ int ufs_truncate(struct inode *inode, loff_t old_i_size) | |||
481 | break; | 481 | break; |
482 | if (IS_SYNC(inode) && (inode->i_state & I_DIRTY)) | 482 | if (IS_SYNC(inode) && (inode->i_state & I_DIRTY)) |
483 | ufs_sync_inode (inode); | 483 | ufs_sync_inode (inode); |
484 | blk_run_address_space(inode->i_mapping); | 484 | blk_flush_plug(current); |
485 | yield(); | 485 | yield(); |
486 | } | 486 | } |
487 | 487 | ||
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index ec7bbb5645b6..83c1c20d145a 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -1495,7 +1495,6 @@ const struct address_space_operations xfs_address_space_operations = { | |||
1495 | .readpages = xfs_vm_readpages, | 1495 | .readpages = xfs_vm_readpages, |
1496 | .writepage = xfs_vm_writepage, | 1496 | .writepage = xfs_vm_writepage, |
1497 | .writepages = xfs_vm_writepages, | 1497 | .writepages = xfs_vm_writepages, |
1498 | .sync_page = block_sync_page, | ||
1499 | .releasepage = xfs_vm_releasepage, | 1498 | .releasepage = xfs_vm_releasepage, |
1500 | .invalidatepage = xfs_vm_invalidatepage, | 1499 | .invalidatepage = xfs_vm_invalidatepage, |
1501 | .write_begin = xfs_vm_write_begin, | 1500 | .write_begin = xfs_vm_write_begin, |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index ac1c7e8378dd..4f8f53c4d42c 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -991,7 +991,7 @@ xfs_buf_lock( | |||
991 | if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) | 991 | if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) |
992 | xfs_log_force(bp->b_target->bt_mount, 0); | 992 | xfs_log_force(bp->b_target->bt_mount, 0); |
993 | if (atomic_read(&bp->b_io_remaining)) | 993 | if (atomic_read(&bp->b_io_remaining)) |
994 | blk_run_address_space(bp->b_target->bt_mapping); | 994 | blk_flush_plug(current); |
995 | down(&bp->b_sema); | 995 | down(&bp->b_sema); |
996 | XB_SET_OWNER(bp); | 996 | XB_SET_OWNER(bp); |
997 | 997 | ||
@@ -1035,9 +1035,7 @@ xfs_buf_wait_unpin( | |||
1035 | set_current_state(TASK_UNINTERRUPTIBLE); | 1035 | set_current_state(TASK_UNINTERRUPTIBLE); |
1036 | if (atomic_read(&bp->b_pin_count) == 0) | 1036 | if (atomic_read(&bp->b_pin_count) == 0) |
1037 | break; | 1037 | break; |
1038 | if (atomic_read(&bp->b_io_remaining)) | 1038 | io_schedule(); |
1039 | blk_run_address_space(bp->b_target->bt_mapping); | ||
1040 | schedule(); | ||
1041 | } | 1039 | } |
1042 | remove_wait_queue(&bp->b_waiters, &wait); | 1040 | remove_wait_queue(&bp->b_waiters, &wait); |
1043 | set_current_state(TASK_RUNNING); | 1041 | set_current_state(TASK_RUNNING); |
@@ -1443,7 +1441,7 @@ xfs_buf_iowait( | |||
1443 | trace_xfs_buf_iowait(bp, _RET_IP_); | 1441 | trace_xfs_buf_iowait(bp, _RET_IP_); |
1444 | 1442 | ||
1445 | if (atomic_read(&bp->b_io_remaining)) | 1443 | if (atomic_read(&bp->b_io_remaining)) |
1446 | blk_run_address_space(bp->b_target->bt_mapping); | 1444 | blk_flush_plug(current); |
1447 | wait_for_completion(&bp->b_iowait); | 1445 | wait_for_completion(&bp->b_iowait); |
1448 | 1446 | ||
1449 | trace_xfs_buf_iowait_done(bp, _RET_IP_); | 1447 | trace_xfs_buf_iowait_done(bp, _RET_IP_); |
@@ -1667,7 +1665,6 @@ xfs_mapping_buftarg( | |||
1667 | struct inode *inode; | 1665 | struct inode *inode; |
1668 | struct address_space *mapping; | 1666 | struct address_space *mapping; |
1669 | static const struct address_space_operations mapping_aops = { | 1667 | static const struct address_space_operations mapping_aops = { |
1670 | .sync_page = block_sync_page, | ||
1671 | .migratepage = fail_migrate_page, | 1668 | .migratepage = fail_migrate_page, |
1672 | }; | 1669 | }; |
1673 | 1670 | ||
@@ -1948,7 +1945,7 @@ xfsbufd( | |||
1948 | count++; | 1945 | count++; |
1949 | } | 1946 | } |
1950 | if (count) | 1947 | if (count) |
1951 | blk_run_address_space(target->bt_mapping); | 1948 | blk_flush_plug(current); |
1952 | 1949 | ||
1953 | } while (!kthread_should_stop()); | 1950 | } while (!kthread_should_stop()); |
1954 | 1951 | ||
@@ -1996,7 +1993,7 @@ xfs_flush_buftarg( | |||
1996 | 1993 | ||
1997 | if (wait) { | 1994 | if (wait) { |
1998 | /* Expedite and wait for IO to complete. */ | 1995 | /* Expedite and wait for IO to complete. */ |
1999 | blk_run_address_space(target->bt_mapping); | 1996 | blk_flush_plug(current); |
2000 | while (!list_empty(&wait_list)) { | 1997 | while (!list_empty(&wait_list)) { |
2001 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); | 1998 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); |
2002 | 1999 | ||