]> err.no Git - linux-2.6/commitdiff
NFS: Make directIO aware of compound pages...
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 3 Jan 2006 08:55:35 +0000 (09:55 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:50 +0000 (14:58 -0500)
 ...and avoid calling set_page_dirty on them

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/direct.c

index fd7ac5e841c1ddd57dab6c7a55941c392211e129..10ae377e68ff2e0e3253a51ef411c040a3a89f7d 100644 (file)
@@ -122,9 +122,10 @@ nfs_free_user_pages(struct page **pages, int npages, int do_dirty)
 {
        int i;
        for (i = 0; i < npages; i++) {
-               if (do_dirty)
-                       set_page_dirty_lock(pages[i]);
-               page_cache_release(pages[i]);
+               struct page *page = pages[i];
+               if (do_dirty && !PageCompound(page))
+                       set_page_dirty_lock(page);
+               page_cache_release(page);
        }
        kfree(pages);
 }