aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2012-04-23 11:14:50 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-27 09:51:07 -0700
commit56bd028ddf6c29e44b87ce0bd79754fe944d1850 (patch)
tree5c58688303aaf07a2f7eabba4d064b2015ec64fa /fs/jbd2/commit.c
parent027e5d441e6a46ab6cfd5f0e27c5eebd533b8131 (diff)
downloadkernel_samsung_crespo-56bd028ddf6c29e44b87ce0bd79754fe944d1850.zip
kernel_samsung_crespo-56bd028ddf6c29e44b87ce0bd79754fe944d1850.tar.gz
kernel_samsung_crespo-56bd028ddf6c29e44b87ce0bd79754fe944d1850.tar.bz2
mm: fix s390 BUG by __set_page_dirty_no_writeback on swap
commit aca50bd3b4c4bb5528a1878158ba7abce41de534 upstream. Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390 3.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap() tries to transfer dirty flag from s390 storage key to struct page and radix_tree. That would be because of reclaim's shrink_page_list() calling add_to_swap() on this page at the same time: first PageSwapCache is set (causing page_mapping(page) to appear as &swapper_space), then page->private set, then tree_lock taken, then page inserted into radix_tree - so there's an interval before taking the lock when the radix_tree slot is empty. We could fix this by moving __add_to_swap_cache()'s spin_lock_irq up before the SetPageSwapCache. But a better fix is simply to do what's five years overdue: Ken Chen introduced __set_page_dirty_no_writeback() (if !PageDirty TestSetPageDirty) for tmpfs to skip all the radix_tree overhead, and swap is just the same - it ignores the radix_tree tag, and does not participate in dirty page accounting, so should be using __set_page_dirty_no_writeback() too. s390 testing now confirms that this does indeed fix the problem. Reported-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Hugh Dickins <hughd@google.com> Acked-by: Mel Gorman <mgorman@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Ken Chen <kenchen@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions