diff options
Diffstat (limited to 'fs/gfs2/aops.c')
| -rw-r--r-- | fs/gfs2/aops.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 694b5d48f036..7b8da9415267 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
| @@ -269,7 +269,6 @@ static int gfs2_write_jdata_pagevec(struct address_space *mapping, | |||
| 269 | pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT; | 269 | pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT; |
| 270 | unsigned offset = i_size & (PAGE_CACHE_SIZE-1); | 270 | unsigned offset = i_size & (PAGE_CACHE_SIZE-1); |
| 271 | unsigned nrblocks = nr_pages * (PAGE_CACHE_SIZE/inode->i_sb->s_blocksize); | 271 | unsigned nrblocks = nr_pages * (PAGE_CACHE_SIZE/inode->i_sb->s_blocksize); |
| 272 | struct backing_dev_info *bdi = mapping->backing_dev_info; | ||
| 273 | int i; | 272 | int i; |
| 274 | int ret; | 273 | int ret; |
| 275 | 274 | ||
| @@ -313,11 +312,6 @@ static int gfs2_write_jdata_pagevec(struct address_space *mapping, | |||
| 313 | 312 | ||
| 314 | if (ret || (--(wbc->nr_to_write) <= 0)) | 313 | if (ret || (--(wbc->nr_to_write) <= 0)) |
| 315 | ret = 1; | 314 | ret = 1; |
| 316 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | ||
| 317 | wbc->encountered_congestion = 1; | ||
| 318 | ret = 1; | ||
| 319 | } | ||
| 320 | |||
| 321 | } | 315 | } |
| 322 | gfs2_trans_end(sdp); | 316 | gfs2_trans_end(sdp); |
| 323 | return ret; | 317 | return ret; |
| @@ -338,7 +332,6 @@ static int gfs2_write_jdata_pagevec(struct address_space *mapping, | |||
| 338 | static int gfs2_write_cache_jdata(struct address_space *mapping, | 332 | static int gfs2_write_cache_jdata(struct address_space *mapping, |
| 339 | struct writeback_control *wbc) | 333 | struct writeback_control *wbc) |
| 340 | { | 334 | { |
| 341 | struct backing_dev_info *bdi = mapping->backing_dev_info; | ||
| 342 | int ret = 0; | 335 | int ret = 0; |
| 343 | int done = 0; | 336 | int done = 0; |
| 344 | struct pagevec pvec; | 337 | struct pagevec pvec; |
| @@ -348,11 +341,6 @@ static int gfs2_write_cache_jdata(struct address_space *mapping, | |||
| 348 | int scanned = 0; | 341 | int scanned = 0; |
| 349 | int range_whole = 0; | 342 | int range_whole = 0; |
| 350 | 343 | ||
| 351 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | ||
| 352 | wbc->encountered_congestion = 1; | ||
| 353 | return 0; | ||
| 354 | } | ||
| 355 | |||
| 356 | pagevec_init(&pvec, 0); | 344 | pagevec_init(&pvec, 0); |
| 357 | if (wbc->range_cyclic) { | 345 | if (wbc->range_cyclic) { |
| 358 | index = mapping->writeback_index; /* Start from prev offset */ | 346 | index = mapping->writeback_index; /* Start from prev offset */ |
| @@ -819,8 +807,10 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh, | |||
| 819 | mark_inode_dirty(inode); | 807 | mark_inode_dirty(inode); |
| 820 | } | 808 | } |
| 821 | 809 | ||
| 822 | if (inode == sdp->sd_rindex) | 810 | if (inode == sdp->sd_rindex) { |
| 823 | adjust_fs_space(inode); | 811 | adjust_fs_space(inode); |
| 812 | ip->i_gh.gh_flags |= GL_NOCACHE; | ||
| 813 | } | ||
| 824 | 814 | ||
| 825 | brelse(dibh); | 815 | brelse(dibh); |
| 826 | gfs2_trans_end(sdp); | 816 | gfs2_trans_end(sdp); |
| @@ -889,8 +879,10 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping, | |||
| 889 | mark_inode_dirty(inode); | 879 | mark_inode_dirty(inode); |
| 890 | } | 880 | } |
| 891 | 881 | ||
| 892 | if (inode == sdp->sd_rindex) | 882 | if (inode == sdp->sd_rindex) { |
| 893 | adjust_fs_space(inode); | 883 | adjust_fs_space(inode); |
| 884 | ip->i_gh.gh_flags |= GL_NOCACHE; | ||
| 885 | } | ||
| 894 | 886 | ||
| 895 | brelse(dibh); | 887 | brelse(dibh); |
| 896 | gfs2_trans_end(sdp); | 888 | gfs2_trans_end(sdp); |
