diff options
Diffstat (limited to 'mm/page-writeback.c')
| -rw-r--r-- | mm/page-writeback.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 3c84128596ba..74dc57c74349 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
| @@ -240,7 +240,7 @@ void bdi_writeout_inc(struct backing_dev_info *bdi) | |||
| 240 | } | 240 | } |
| 241 | EXPORT_SYMBOL_GPL(bdi_writeout_inc); | 241 | EXPORT_SYMBOL_GPL(bdi_writeout_inc); |
| 242 | 242 | ||
| 243 | static inline void task_dirty_inc(struct task_struct *tsk) | 243 | void task_dirty_inc(struct task_struct *tsk) |
| 244 | { | 244 | { |
| 245 | prop_inc_single(&vm_dirties, &tsk->dirties); | 245 | prop_inc_single(&vm_dirties, &tsk->dirties); |
| 246 | } | 246 | } |
| @@ -1230,6 +1230,7 @@ int __set_page_dirty_nobuffers(struct page *page) | |||
| 1230 | __inc_zone_page_state(page, NR_FILE_DIRTY); | 1230 | __inc_zone_page_state(page, NR_FILE_DIRTY); |
| 1231 | __inc_bdi_stat(mapping->backing_dev_info, | 1231 | __inc_bdi_stat(mapping->backing_dev_info, |
| 1232 | BDI_RECLAIMABLE); | 1232 | BDI_RECLAIMABLE); |
| 1233 | task_dirty_inc(current); | ||
| 1233 | task_io_account_write(PAGE_CACHE_SIZE); | 1234 | task_io_account_write(PAGE_CACHE_SIZE); |
| 1234 | } | 1235 | } |
| 1235 | radix_tree_tag_set(&mapping->page_tree, | 1236 | radix_tree_tag_set(&mapping->page_tree, |
| @@ -1262,7 +1263,7 @@ EXPORT_SYMBOL(redirty_page_for_writepage); | |||
| 1262 | * If the mapping doesn't provide a set_page_dirty a_op, then | 1263 | * If the mapping doesn't provide a set_page_dirty a_op, then |
| 1263 | * just fall through and assume that it wants buffer_heads. | 1264 | * just fall through and assume that it wants buffer_heads. |
| 1264 | */ | 1265 | */ |
| 1265 | static int __set_page_dirty(struct page *page) | 1266 | int set_page_dirty(struct page *page) |
| 1266 | { | 1267 | { |
| 1267 | struct address_space *mapping = page_mapping(page); | 1268 | struct address_space *mapping = page_mapping(page); |
| 1268 | 1269 | ||
| @@ -1280,14 +1281,6 @@ static int __set_page_dirty(struct page *page) | |||
| 1280 | } | 1281 | } |
| 1281 | return 0; | 1282 | return 0; |
| 1282 | } | 1283 | } |
| 1283 | |||
| 1284 | int set_page_dirty(struct page *page) | ||
| 1285 | { | ||
| 1286 | int ret = __set_page_dirty(page); | ||
| 1287 | if (ret) | ||
| 1288 | task_dirty_inc(current); | ||
| 1289 | return ret; | ||
| 1290 | } | ||
| 1291 | EXPORT_SYMBOL(set_page_dirty); | 1284 | EXPORT_SYMBOL(set_page_dirty); |
| 1292 | 1285 | ||
| 1293 | /* | 1286 | /* |
