kernel-ark/include
Linus Torvalds fba2591bf4 VM: Remove "clear_page_dirty()" and "test_clear_page_dirty()" functions
They were horribly easy to mis-use because of their tempting naming, and
they also did way more than any users of them generally wanted them to
do.

A dirty page can become clean under two circumstances:

 (a) when we write it out.  We have "clear_page_dirty_for_io()" for
     this, and that function remains unchanged.

     In the "for IO" case it is not sufficient to just clear the dirty
     bit, you also have to mark the page as being under writeback etc.

 (b) when we actually remove a page due to it becoming inaccessible to
     users, notably because it was truncate()'d away or the file (or
     metadata) no longer exists, and we thus want to cancel any
     outstanding dirty state.

For the (b) case, we now introduce "cancel_dirty_page()", which only
touches the page state itself, and verifies that the page is not mapped
(since cancelling writes on a mapped page would be actively wrong as it
is still accessible to users).

Some filesystems need to be fixed up for this: CIFS, FUSE, JFS,
ReiserFS, XFS all use the old confusing functions, and will be fixed
separately in subsequent commits (with some of them just removing the
offending logic, and others using clear_page_dirty_for_io()).

This was confirmed by Martin Michlmayr to fix the apt database
corruption on ARM.

Cc: Martin Michlmayr <tbm@cyrius.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Andrei Popa <andrei.popa@i-neo.ro>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Gordon Farquharson <gordonfarquharson@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-21 09:19:57 -08:00
..
acpi
asm-alpha
asm-arm [ARM] 4057/1: ixp23xx: unconditionally enable hardware coherency 2006-12-18 00:14:59 +00:00
asm-arm26
asm-avr32
asm-cris
asm-frv
asm-generic PCI: Fix multiple problems with VIA hardware 2006-12-20 10:54:43 -08:00
asm-h8300
asm-i386
asm-ia64
asm-m32r
asm-m68k
asm-m68knommu
asm-mips
asm-parisc
asm-powerpc [POWERPC] cell: add forward struct declarations to spu.h 2006-12-19 15:35:36 +01:00
asm-ppc
asm-s390
asm-sh
asm-sh64
asm-sparc [SPARC]: Make bitops use same spinlocks as atomics. 2006-12-17 16:18:47 -08:00
asm-sparc64 [SPARC64]: Mirror x86_64's PERCPU_ENOUGH_ROOM definition. 2006-12-17 14:06:59 -08:00
asm-um
asm-v850
asm-x86_64
asm-xtensa
crypto
keys
linux VM: Remove "clear_page_dirty()" and "test_clear_page_dirty()" functions 2006-12-21 09:19:57 -08:00
math-emu
media
mtd
net [AX.25]: Fix unchecked rose_add_loopback_neigh uses 2006-12-17 21:59:14 -08:00
pcmcia
rdma
rxrpc
scsi
sound [ALSA] version 1.0.14rc1 2006-12-20 09:11:55 +01:00
video
Kbuild