kernel-ark/include
Trond Myklebust 1b3b4a1a2d NFS: Fix a write request leak in nfs_invalidate_page()
Ryusuke Konishi says:

The recent truncate_complete_page() clears the dirty flag from a page
before calling a_ops->invalidatepage(),
^^^^^^
static void
truncate_complete_page(struct address_space *mapping, struct page *page)
{
        ...
        cancel_dirty_page(page, PAGE_CACHE_SIZE);  <--- Inserted here at
kernel 2.6.20

        if (PagePrivate(page))
                do_invalidatepage(page, 0);   ---> will call
a_ops->invalidatepage()
        ...
}

and this is disturbing nfs_wb_page_priority() from calling 
nfs_writepage_locked() that is expected to handle the pending
request (=nfs_page) associated with the page.

int nfs_wb_page_priority(struct inode *inode, struct page *page, int how)
{
        ...
        if (clear_page_dirty_for_io(page)) {
                ret = nfs_writepage_locked(page, &wbc);
                if (ret < 0)
                        goto out;
        }
        ...
}

Since truncate_complete_page() will get rid of the page after
a_ops->invalidatepage() returns, the request (=nfs_page) associated
with the page becomes a garbage in nfs_inode->nfs_page_tree.
------------------------

Fix this by ensuring that nfs_wb_page_priority() recognises that it may
also need to clear out non-dirty pages that have an nfs_page associated
with them.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-09-01 10:14:54 -04:00
..
acpi Pull events into release branch 2007-08-25 01:44:01 -04:00
asm-alpha Fix Alpha O_CLOEXEC definition 2007-08-09 08:39:22 -07:00
asm-arm Merge branch 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2007-08-25 12:38:47 +01:00
asm-avr32 [AVR32] Define mmiowb() 2007-08-15 16:36:56 +02:00
asm-blackfin remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-cris remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-frv FRV: connect up fallocate 2007-08-11 15:47:40 -07:00
asm-generic changing include/asm-generic/pgtable.h for non-mmu 2007-08-11 15:47:42 -07:00
asm-h8300 remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-i386 Pull bugzilla-1641 into release branch 2007-08-24 22:19:05 -04:00
asm-ia64 [IA64] SN2 needs platform specific irq_to_vector() function. 2007-08-13 10:31:26 -07:00
asm-m32r remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-m68k m68k: Enable arbitary speed tty support 2007-08-22 19:52:45 -07:00
asm-m68knommu m68knommu: include asm-generic/pgtable.h 2007-08-23 21:32:54 -07:00
asm-mips [MIPS] Polish <asm/edac.h>. 2007-08-27 02:16:59 +01:00
asm-parisc [PARISC] Add dummy isa_(bus|virt)_to_(virt|bus) inlines 2007-08-27 00:29:22 -04:00
asm-powerpc [POWERPC] Fix FSL BookE machine check reporting 2007-08-17 13:22:28 -05:00
asm-ppc [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support 2007-07-24 21:16:02 +00:00
asm-s390 [S390] Change atomic_read/set to inline functions with barrier semantics. 2007-08-22 13:51:49 +02:00
asm-sh sh: Add missing dma_sync_single_range_for_*(). 2007-08-10 02:37:01 +09:00
asm-sh64 sh64: Add missing dma_sync_single_for_*(). 2007-08-10 02:47:31 +09:00
asm-sparc [SPARC32]: Make flush_tlb_kernel_range() an inline function. 2007-08-26 18:49:12 -07:00
asm-sparc64 [SPARC64]: Fix several bugs in MSI handling. 2007-08-30 23:06:51 -07:00
asm-um uml: fix x86_64 core dump crash 2007-08-31 01:42:22 -07:00
asm-v850 remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-x86_64 Pull bugzilla-1641 into release branch 2007-08-24 22:19:05 -04:00
asm-xtensa remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
crypto
keys
linux NFS: Fix a write request leak in nfs_invalidate_page() 2007-09-01 10:14:54 -04:00
math-emu Fix <math-emu/soft-fp.h> tpyo 2007-08-18 17:15:17 -07:00
media
mtd
net SCTP: Fix to encode PROTOCOL VIOLATION error cause correctly 2007-08-30 13:50:48 -04:00
pcmcia
rdma IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c 2007-08-03 10:45:18 -07:00
rxrpc
scsi [SCSI] sd: disentangle barriers in SCSI 2007-08-04 08:37:04 -05:00
sound
video remove tx3912fb 2007-07-31 15:39:41 -07:00
xen xen: xen/page.h compile fix 2007-07-26 11:35:16 -07:00
Kbuild