aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/vtbl.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-08-29 07:51:52 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-10-14 06:10:21 -0400
commite88d6e10e5c848fd5be8f89e09e3bce2570886b7 (patch)
tree27b5547a0e24add89deafedaed784328bc3c173e /drivers/mtd/ubi/vtbl.c
parent33818bbb84cd371b63ed8849cc5264d24c8b3aa2 (diff)
UBI: do not use vmalloc on I/O path
Similar reason as in case of the previous patch: it causes deadlocks if a filesystem with writeback support works on top of UBI. So pre-allocate needed buffers when attaching MTD device. We also need mutexes to protect the buffers, but they do not cause much contantion because they are used in recovery, torture, and WL copy routines, which are called seldom. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/vtbl.c')
-rw-r--r--drivers/mtd/ubi/vtbl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index b0a1e8426456..25b3bd61c7ec 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -254,7 +254,7 @@ bad:
254 * This function returns zero in case of success and a negative error code in 254 * This function returns zero in case of success and a negative error code in
255 * case of failure. 255 * case of failure.
256 */ 256 */
257static int create_vtbl(const struct ubi_device *ubi, struct ubi_scan_info *si, 257static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si,
258 int copy, void *vtbl) 258 int copy, void *vtbl)
259{ 259{
260 int err, tries = 0; 260 int err, tries = 0;
@@ -339,7 +339,7 @@ out_free:
339 * not corrupted, and recovering from corruptions if needed. Returns volume 339 * not corrupted, and recovering from corruptions if needed. Returns volume
340 * table in case of success and a negative error code in case of failure. 340 * table in case of success and a negative error code in case of failure.
341 */ 341 */
342static struct ubi_vtbl_record *process_lvol(const struct ubi_device *ubi, 342static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi,
343 struct ubi_scan_info *si, 343 struct ubi_scan_info *si,
344 struct ubi_scan_volume *sv) 344 struct ubi_scan_volume *sv)
345{ 345{
@@ -453,7 +453,7 @@ out_free:
453 * This function returns volume table contents in case of success and a 453 * This function returns volume table contents in case of success and a
454 * negative error code in case of failure. 454 * negative error code in case of failure.
455 */ 455 */
456static struct ubi_vtbl_record *create_empty_lvol(const struct ubi_device *ubi, 456static struct ubi_vtbl_record *create_empty_lvol(struct ubi_device *ubi,
457 struct ubi_scan_info *si) 457 struct ubi_scan_info *si)
458{ 458{
459 int i; 459 int i;