aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/wl.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/wl.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/wl.c')
-rw-r--r--drivers/mtd/ubi/wl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 248ff9e477e7..6e5315bf5e1b 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -208,7 +208,7 @@ struct ubi_work {
208}; 208};
209 209
210#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID 210#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
211static int paranoid_check_ec(const struct ubi_device *ubi, int pnum, int ec); 211static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec);
212static int paranoid_check_in_wl_tree(struct ubi_wl_entry *e, 212static int paranoid_check_in_wl_tree(struct ubi_wl_entry *e,
213 struct rb_root *root); 213 struct rb_root *root);
214#else 214#else
@@ -1625,7 +1625,7 @@ void ubi_wl_close(struct ubi_device *ubi)
1625 * is equivalent to @ec, %1 if not, and a negative error code if an error 1625 * is equivalent to @ec, %1 if not, and a negative error code if an error
1626 * occurred. 1626 * occurred.
1627 */ 1627 */
1628static int paranoid_check_ec(const struct ubi_device *ubi, int pnum, int ec) 1628static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec)
1629{ 1629{
1630 int err; 1630 int err;
1631 long long read_ec; 1631 long long read_ec;