Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297974
b: refs/heads/master
c: e94f7ba
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton committed Mar 23, 2012
1 parent 0c8014f commit 31ad66b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2e8764009a0245fd24fcd2a63ffbf64236af016
refs/heads/master: e94f7ba124bfbd3898f620c46891ebcfb9cf20d0
13 changes: 6 additions & 7 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2045,23 +2045,22 @@ cifs_write_allocate_pages(struct page **pages, unsigned long num_pages)
unsigned long i;

for (i = 0; i < num_pages; i++) {
pages[i] = alloc_page(__GFP_HIGHMEM);
pages[i] = alloc_page(GFP_KERNEL|__GFP_HIGHMEM);
if (!pages[i]) {
/*
* save number of pages we have already allocated and
* return with ENOMEM error
*/
num_pages = i;
rc = -ENOMEM;
goto error;
break;
}
}

return rc;

error:
for (i = 0; i < num_pages; i++)
put_page(pages[i]);
if (rc) {
for (i = 0; i < num_pages; i++)
put_page(pages[i]);
}
return rc;
}

Expand Down

0 comments on commit 31ad66b

Please sign in to comment.