diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index c67ddc464721..893d7677579e 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -628,8 +628,6 @@ EXPORT_SYMBOL(write_one_page); | |||
628 | */ | 628 | */ |
629 | int __set_page_dirty_nobuffers(struct page *page) | 629 | int __set_page_dirty_nobuffers(struct page *page) |
630 | { | 630 | { |
631 | int ret = 0; | ||
632 | |||
633 | if (!TestSetPageDirty(page)) { | 631 | if (!TestSetPageDirty(page)) { |
634 | struct address_space *mapping = page_mapping(page); | 632 | struct address_space *mapping = page_mapping(page); |
635 | struct address_space *mapping2; | 633 | struct address_space *mapping2; |
@@ -651,8 +649,9 @@ int __set_page_dirty_nobuffers(struct page *page) | |||
651 | I_DIRTY_PAGES); | 649 | I_DIRTY_PAGES); |
652 | } | 650 | } |
653 | } | 651 | } |
652 | return 1; | ||
654 | } | 653 | } |
655 | return ret; | 654 | return 0; |
656 | } | 655 | } |
657 | EXPORT_SYMBOL(__set_page_dirty_nobuffers); | 656 | EXPORT_SYMBOL(__set_page_dirty_nobuffers); |
658 | 657 | ||
@@ -682,8 +681,10 @@ int fastcall set_page_dirty(struct page *page) | |||
682 | return (*spd)(page); | 681 | return (*spd)(page); |
683 | return __set_page_dirty_buffers(page); | 682 | return __set_page_dirty_buffers(page); |
684 | } | 683 | } |
685 | if (!PageDirty(page)) | 684 | if (!PageDirty(page)) { |
686 | SetPageDirty(page); | 685 | if (!TestSetPageDirty(page)) |
686 | return 1; | ||
687 | } | ||
687 | return 0; | 688 | return 0; |
688 | } | 689 | } |
689 | EXPORT_SYMBOL(set_page_dirty); | 690 | EXPORT_SYMBOL(set_page_dirty); |