Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68519
b: refs/heads/master
c: 98b830d
h: refs/heads/master
i:
  68517: 684571f
  68515: 645a29c
  68511: e6c1ba5
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Sep 6, 2007
1 parent 92e3590 commit 38db195
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 241651d04d672fb685b2874707016cbbf95931e5
refs/heads/master: 98b830d26095007aeb04041147b93d2b74e0a0c0
8 changes: 7 additions & 1 deletion trunk/drivers/mtd/nand/nandsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,13 @@ static int prog_page(struct nandsim *ns, int num)
mypage = NS_GET_PAGE(ns);
if (mypage->byte == NULL) {
NS_DBG("prog_page: allocating page %d\n", ns->regs.row);
mypage->byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
/*
* We allocate memory with GFP_NOFS because a flash FS may
* utilize this. If it is holding an FS lock, then gets here,
* then kmalloc runs writeback which goes to the FS again
* and deadlocks. This was seen in practice.
*/
mypage->byte = kmalloc(ns->geom.pgszoob, GFP_NOFS);
if (mypage->byte == NULL) {
NS_ERR("prog_page: error allocating memory for page %d\n", ns->regs.row);
return -1;
Expand Down

0 comments on commit 38db195

Please sign in to comment.