android_kernel_xiaomi_sm8350/mm
Trond Myklebust e3db7691e9 [PATCH] NFS: Fix race in nfs_release_page()
NFS: Fix race in nfs_release_page()

    invalidate_inode_pages2() may find the dirty bit has been set on a page
    owing to the fact that the page may still be mapped after it was locked.
    Only after the call to unmap_mapping_range() are we sure that the page
    can no longer be dirtied.
    In order to fix this, NFS has hooked the releasepage() method and tries
    to write the page out between the call to unmap_mapping_range() and the
    call to remove_mapping(). This, however leads to deadlocks in the page
    reclaim code, where the page may be locked without holding a reference
    to the inode or dentry.

    Fix is to add a new address_space_operation, launder_page(), which will
    attempt to write out a dirty page without releasing the page lock.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

    Also, the bare SetPageDirty() can skew all sort of accounting leading to
    other nasties.

[akpm@osdl.org: cleanup]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:21 -08:00
..
allocpercpu.c
backing-dev.c
bootmem.c
bounce.c
fadvise.c
filemap_xip.c [PATCH] mm: more rmap debugging 2006-12-22 08:55:49 -08:00
filemap.c
filemap.h
fremap.c [PATCH] mm: more rmap debugging 2006-12-22 08:55:49 -08:00
highmem.c
hugetlb.c
internal.h
Kconfig
madvise.c
Makefile
memory_hotplug.c [PATCH] Fix sparsemem on Cell 2007-01-11 18:18:20 -08:00
memory.c [ARM] pass vma for flush_anon_page() 2007-01-08 19:49:54 +00:00
mempolicy.c
mempool.c
migrate.c
mincore.c
mlock.c
mmap.c
mmzone.c
mprotect.c
mremap.c
msync.c
nommu.c
oom_kill.c [PATCH] fix OOM killing of swapoff 2007-01-05 23:55:29 -08:00
page_alloc.c [PATCH] Fix sparsemem on Cell 2007-01-11 18:18:20 -08:00
page_io.c
page-writeback.c VM: Fix nasty and subtle race in shared mmap'ed page writeback 2006-12-29 10:00:58 -08:00
pdflush.c
prio_tree.c
readahead.c
rmap.c [PATCH] page_mkclean_one(): fix call to set_pte_at() 2006-12-30 10:56:42 -08:00
shmem_acl.c
shmem.c [PATCH] Fix for shmem_truncate_range() BUG_ON() 2006-12-22 08:55:47 -08:00
slab.c [PATCH] fix BUG_ON(!PageSlab) from fallback_alloc 2007-01-05 23:55:23 -08:00
slob.c [PATCH] MM: SLOB is broken by recent cleanup of slab.h 2006-12-30 10:56:42 -08:00
sparse.c
swap_state.c
swap.c
swapfile.c [PATCH] swsusp: Do not fail if resume device is not set 2007-01-05 23:55:22 -08:00
thrash.c
tiny-shmem.c
truncate.c [PATCH] NFS: Fix race in nfs_release_page() 2007-01-11 18:18:21 -08:00
util.c
vmalloc.c
vmscan.c [PATCH] shrink_all_memory(): fix lru_pages handling 2007-01-05 23:55:29 -08:00
vmstat.c