mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
NFS: Make directIO aware of compound pages...
...and avoid calling set_page_dirty on them Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
70b9ecbdb9
commit
566dd6064e
1 changed files with 4 additions and 3 deletions
|
@ -122,9 +122,10 @@ nfs_free_user_pages(struct page **pages, int npages, int do_dirty)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < npages; i++) {
|
for (i = 0; i < npages; i++) {
|
||||||
if (do_dirty)
|
struct page *page = pages[i];
|
||||||
set_page_dirty_lock(pages[i]);
|
if (do_dirty && !PageCompound(page))
|
||||||
page_cache_release(pages[i]);
|
set_page_dirty_lock(page);
|
||||||
|
page_cache_release(page);
|
||||||
}
|
}
|
||||||
kfree(pages);
|
kfree(pages);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue