diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index b6e8b8632e2f..9f697419ed8e 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -777,6 +777,7 @@ static int __set_page_dirty(struct page *page, | |||
777 | __inc_zone_page_state(page, NR_FILE_DIRTY); | 777 | __inc_zone_page_state(page, NR_FILE_DIRTY); |
778 | __inc_bdi_stat(mapping->backing_dev_info, | 778 | __inc_bdi_stat(mapping->backing_dev_info, |
779 | BDI_RECLAIMABLE); | 779 | BDI_RECLAIMABLE); |
780 | task_dirty_inc(current); | ||
780 | task_io_account_write(PAGE_CACHE_SIZE); | 781 | task_io_account_write(PAGE_CACHE_SIZE); |
781 | } | 782 | } |
782 | radix_tree_tag_set(&mapping->page_tree, | 783 | radix_tree_tag_set(&mapping->page_tree, |
@@ -2688,7 +2689,7 @@ int nobh_write_end(struct file *file, struct address_space *mapping, | |||
2688 | struct buffer_head *bh; | 2689 | struct buffer_head *bh; |
2689 | BUG_ON(fsdata != NULL && page_has_buffers(page)); | 2690 | BUG_ON(fsdata != NULL && page_has_buffers(page)); |
2690 | 2691 | ||
2691 | if (unlikely(copied < len) && !page_has_buffers(page)) | 2692 | if (unlikely(copied < len) && head) |
2692 | attach_nobh_buffers(page, head); | 2693 | attach_nobh_buffers(page, head); |
2693 | if (page_has_buffers(page)) | 2694 | if (page_has_buffers(page)) |
2694 | return generic_write_end(file, mapping, pos, len, | 2695 | return generic_write_end(file, mapping, pos, len, |
@@ -3108,7 +3109,7 @@ int sync_dirty_buffer(struct buffer_head *bh) | |||
3108 | if (test_clear_buffer_dirty(bh)) { | 3109 | if (test_clear_buffer_dirty(bh)) { |
3109 | get_bh(bh); | 3110 | get_bh(bh); |
3110 | bh->b_end_io = end_buffer_write_sync; | 3111 | bh->b_end_io = end_buffer_write_sync; |
3111 | ret = submit_bh(WRITE_SYNC, bh); | 3112 | ret = submit_bh(WRITE, bh); |
3112 | wait_on_buffer(bh); | 3113 | wait_on_buffer(bh); |
3113 | if (buffer_eopnotsupp(bh)) { | 3114 | if (buffer_eopnotsupp(bh)) { |
3114 | clear_buffer_eopnotsupp(bh); | 3115 | clear_buffer_eopnotsupp(bh); |
@@ -3243,7 +3244,7 @@ void block_sync_page(struct page *page) | |||
3243 | * Use of bdflush() is deprecated and will be removed in a future kernel. | 3244 | * Use of bdflush() is deprecated and will be removed in a future kernel. |
3244 | * The `pdflush' kernel threads fully replace bdflush daemons and this call. | 3245 | * The `pdflush' kernel threads fully replace bdflush daemons and this call. |
3245 | */ | 3246 | */ |
3246 | asmlinkage long sys_bdflush(int func, long data) | 3247 | SYSCALL_DEFINE2(bdflush, int, func, long, data) |
3247 | { | 3248 | { |
3248 | static int msg_count; | 3249 | static int msg_count; |
3249 | 3250 | ||