aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/vtbl.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-08-28 14:29:32 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-10-14 06:10:20 -0400
commit33818bbb84cd371b63ed8849cc5264d24c8b3aa2 (patch)
treeecee6a8f02d2d103c6eb33cc6173e74343b1861b /drivers/mtd/ubi/vtbl.c
parentef6075fbfca9139f428d52d60e671da38aa2e212 (diff)
UBI: allocate memory with GFP_NOFS
Use GFP_NOFS flag when allocating memory on I/O path, because otherwise we may deadlock the filesystem which works on top of us. We observed the deadlocks with UBIFS. Example: VFS->FS lock a lock->UBI->kmalloc()->VFS writeback->FS locks the same lock again. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/vtbl.c')
-rw-r--r--drivers/mtd/ubi/vtbl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index bc5df50813d6..b0a1e8426456 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -264,7 +264,7 @@ static int create_vtbl(const struct ubi_device *ubi, struct ubi_scan_info *si,
264 264
265 ubi_msg("create volume table (copy #%d)", copy + 1); 265 ubi_msg("create volume table (copy #%d)", copy + 1);
266 266
267 vid_hdr = ubi_zalloc_vid_hdr(ubi); 267 vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_KERNEL);
268 if (!vid_hdr) 268 if (!vid_hdr)
269 return -ENOMEM; 269 return -ENOMEM;
270 270