diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/direct.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index fd7ac5e841c1..10ae377e68ff 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -122,9 +122,10 @@ nfs_free_user_pages(struct page **pages, int npages, int do_dirty) | |||
122 | { | 122 | { |
123 | int i; | 123 | int i; |
124 | for (i = 0; i < npages; i++) { | 124 | for (i = 0; i < npages; i++) { |
125 | if (do_dirty) | 125 | struct page *page = pages[i]; |
126 | set_page_dirty_lock(pages[i]); | 126 | if (do_dirty && !PageCompound(page)) |
127 | page_cache_release(pages[i]); | 127 | set_page_dirty_lock(page); |
128 | page_cache_release(page); | ||
128 | } | 129 | } |
129 | kfree(pages); | 130 | kfree(pages); |
130 | } | 131 | } |