Files
kernel/include/linux
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
..
2007-07-12 15:41:24 -07:00
2007-07-26 01:53:39 +02:00
2007-07-19 10:04:52 -07:00
2007-07-31 15:39:44 -07:00
2007-07-19 10:04:43 -07:00
2007-08-23 21:37:45 -07:00
2007-07-19 10:04:45 -07:00
2007-08-11 22:34:48 +02:00
2007-07-31 10:43:05 -05:00
2007-07-16 09:05:46 -07:00
2007-07-17 10:23:04 -07:00
2007-07-11 16:09:00 -07:00
2007-07-19 10:04:54 -07:00
2007-07-12 10:55:56 -07:00
2007-07-17 10:23:06 -07:00
2007-07-16 09:05:52 -07:00
2007-07-16 09:05:52 -07:00
2007-07-18 09:15:20 -04:00
2007-07-18 09:15:20 -04:00
2007-07-17 10:23:13 -07:00
2007-07-16 09:05:45 -07:00
2007-07-18 18:29:37 -04:00
2007-07-16 09:05:41 -07:00
2007-07-17 10:22:59 -07:00
2007-07-19 10:04:41 -07:00
2007-07-31 15:39:41 -07:00
2007-07-16 09:05:34 -07:00
2007-07-10 22:15:03 -07:00
2007-07-14 18:55:06 -07:00
2007-07-16 09:05:47 -07:00
2007-08-11 15:58:13 -07:00
2007-07-16 09:05:50 -07:00
2007-07-16 09:05:47 -07:00
2007-07-31 15:39:41 -07:00
2007-08-26 18:35:34 -07:00
2007-07-18 08:47:40 -07:00
2007-07-30 14:25:12 -07:00
2007-07-10 22:15:26 -07:00
2007-07-17 10:23:03 -07:00
2007-07-17 10:23:13 -07:00
2007-07-19 10:04:49 -07:00
2007-07-24 12:24:59 -07:00
2007-07-16 09:05:34 -07:00
2007-07-18 08:47:45 -07:00
2007-07-16 09:05:42 -07:00
2007-07-19 10:04:45 -07:00
2007-07-16 09:05:51 -07:00
2007-07-20 13:41:56 +10:00
2007-07-20 13:10:22 +10:00
2007-08-31 01:42:23 -07:00
2007-07-26 11:35:21 -07:00
2007-07-26 11:35:21 -07:00
2007-07-16 09:05:50 -07:00
2007-07-16 09:05:46 -07:00
2007-07-17 10:23:03 -07:00
2007-07-18 08:47:40 -07:00
2007-07-21 18:37:10 -07:00
2007-07-16 09:05:50 -07:00
2007-07-22 11:03:37 -07:00
2007-07-20 12:33:44 -07:00
2007-07-16 09:05:45 -07:00
2007-07-16 09:05:46 -07:00
2007-07-19 10:04:49 -07:00
2007-07-16 09:05:40 -07:00
2007-07-18 08:47:40 -07:00
2007-07-17 10:22:59 -07:00
2007-07-31 15:39:39 -07:00
2007-07-20 11:23:02 -07:00
2007-08-11 15:47:41 -07:00
2007-07-18 15:57:15 -07:00
2007-07-30 13:27:44 -07:00
2007-07-17 10:22:59 -07:00