]> err.no Git - linux-2.6/commit
[PATCH] Fix try_to_free_buffer() locking
authorNick Piggin <nickpiggin@yahoo.com.au>
Tue, 30 Jan 2007 03:36:27 +0000 (14:36 +1100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 30 Jan 2007 04:20:42 +0000 (20:20 -0800)
commit87df7241bd547da5d4d4a4e5397866dfe422e439
treeffe1e90a761aa358ef95e351e0718cb3c377ad37
parent4cbf2aa35e1c189db234190fefc6c83b139ef963
[PATCH] Fix try_to_free_buffer() locking

Fix commit ecdfc9787fe527491baefc22dce8b2dbd5b2908d

Not to put too fine a point on it, but in a nutshell...

__set_page_dirty_buffers() | try_to_free_buffers()
---------------------------+---------------------------
                           | spin_lock(private_lock);
                           | drop_bufers()
                           | spin_unlock(private_lock);
spin_lock(private_lock)    |
!page_has_buffers()        |
spin_unlock(private_lock)  |
SetPageDirty()             |
                           | cancel_dirty_page()

                          oops!

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/buffer.c