buffer.c (ff877ea80efa2015b6263766f78ee42c2a1b32f9) | buffer.c (19fd6231279be3c3bdd02ed99f9b0eb195978064) |
---|---|
1/* 2 * linux/fs/buffer.c 3 * 4 * Copyright (C) 1991, 1992, 2002 Linus Torvalds 5 */ 6 7/* 8 * Start bdflush() with kernel_thread not syscall - Paul Gortmaker, 12/95 --- 692 unchanged lines hidden (view full) --- 701 struct address_space *mapping, int warn) 702{ 703 if (unlikely(!mapping)) 704 return !TestSetPageDirty(page); 705 706 if (TestSetPageDirty(page)) 707 return 0; 708 | 1/* 2 * linux/fs/buffer.c 3 * 4 * Copyright (C) 1991, 1992, 2002 Linus Torvalds 5 */ 6 7/* 8 * Start bdflush() with kernel_thread not syscall - Paul Gortmaker, 12/95 --- 692 unchanged lines hidden (view full) --- 701 struct address_space *mapping, int warn) 702{ 703 if (unlikely(!mapping)) 704 return !TestSetPageDirty(page); 705 706 if (TestSetPageDirty(page)) 707 return 0; 708 |
709 write_lock_irq(&mapping->tree_lock); | 709 spin_lock_irq(&mapping->tree_lock); |
710 if (page->mapping) { /* Race with truncate? */ 711 WARN_ON_ONCE(warn && !PageUptodate(page)); 712 713 if (mapping_cap_account_dirty(mapping)) { 714 __inc_zone_page_state(page, NR_FILE_DIRTY); 715 __inc_bdi_stat(mapping->backing_dev_info, 716 BDI_RECLAIMABLE); 717 task_io_account_write(PAGE_CACHE_SIZE); 718 } 719 radix_tree_tag_set(&mapping->page_tree, 720 page_index(page), PAGECACHE_TAG_DIRTY); 721 } | 710 if (page->mapping) { /* Race with truncate? */ 711 WARN_ON_ONCE(warn && !PageUptodate(page)); 712 713 if (mapping_cap_account_dirty(mapping)) { 714 __inc_zone_page_state(page, NR_FILE_DIRTY); 715 __inc_bdi_stat(mapping->backing_dev_info, 716 BDI_RECLAIMABLE); 717 task_io_account_write(PAGE_CACHE_SIZE); 718 } 719 radix_tree_tag_set(&mapping->page_tree, 720 page_index(page), PAGECACHE_TAG_DIRTY); 721 } |
722 write_unlock_irq(&mapping->tree_lock); | 722 spin_unlock_irq(&mapping->tree_lock); |
723 __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); 724 725 return 1; 726} 727 728/* 729 * Add a page to the dirty page list. 730 * --- 2594 unchanged lines hidden --- | 723 __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); 724 725 return 1; 726} 727 728/* 729 * Add a page to the dirty page list. 730 * --- 2594 unchanged lines hidden --- |