Loading drivers/mtd/ubi/attach.c +1 −3 Original line number Diff line number Diff line Loading @@ -1209,9 +1209,7 @@ static void destroy_ai(struct ubi_attach_info *ai) } } if (ai->aeb_slab_cache) kmem_cache_destroy(ai->aeb_slab_cache); kfree(ai); } Loading drivers/mtd/ubi/cdev.c +1 −1 Original line number Diff line number Diff line Loading @@ -949,7 +949,7 @@ static long ubi_cdev_ioctl(struct file *file, unsigned int cmd, if (!req) { err = -ENOMEM; break; }; } err = copy_from_user(req, argp, sizeof(struct ubi_rnvol_req)); if (err) { Loading drivers/mtd/ubi/debug.c +1 −1 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ int ubi_debugfs_init(void) dfs_rootdir = debugfs_create_dir("ubi", NULL); if (IS_ERR_OR_NULL(dfs_rootdir)) { int err = dfs_rootdir ? -ENODEV : PTR_ERR(dfs_rootdir); int err = dfs_rootdir ? PTR_ERR(dfs_rootdir) : -ENODEV; pr_err("UBI error: cannot create \"ubi\" debugfs directory, error %d\n", err); Loading drivers/mtd/ubi/eba.c +1 −1 Original line number Diff line number Diff line Loading @@ -1358,7 +1358,7 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap, continue; ubi_err(ubi, "LEB:%i:%i is PEB:%i instead of %i!", vol->vol_id, i, fm_eba[i][j], vol->vol_id, j, fm_eba[i][j], scan_eba[i][j]); ubi_assert(0); } Loading drivers/mtd/ubi/fastmap-wl.c +29 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,30 @@ void ubi_refill_pools(struct ubi_device *ubi) spin_unlock(&ubi->wl_lock); } /** * produce_free_peb - produce a free physical eraseblock. * @ubi: UBI device description object * * This function tries to make a free PEB by means of synchronous execution of * pending works. This may be needed if, for example the background thread is * disabled. Returns zero in case of success and a negative error code in case * of failure. */ static int produce_free_peb(struct ubi_device *ubi) { int err; while (!ubi->free.rb_node && ubi->works_count) { dbg_wl("do one work synchronously"); err = do_work(ubi); if (err) return err; } return 0; } /** * ubi_wl_get_peb - get a physical eraseblock. * @ubi: UBI device description object Loading Loading @@ -213,6 +237,11 @@ again: } retried = 1; up_read(&ubi->fm_eba_sem); ret = produce_free_peb(ubi); if (ret < 0) { down_read(&ubi->fm_eba_sem); goto out; } goto again; } Loading Loading
drivers/mtd/ubi/attach.c +1 −3 Original line number Diff line number Diff line Loading @@ -1209,9 +1209,7 @@ static void destroy_ai(struct ubi_attach_info *ai) } } if (ai->aeb_slab_cache) kmem_cache_destroy(ai->aeb_slab_cache); kfree(ai); } Loading
drivers/mtd/ubi/cdev.c +1 −1 Original line number Diff line number Diff line Loading @@ -949,7 +949,7 @@ static long ubi_cdev_ioctl(struct file *file, unsigned int cmd, if (!req) { err = -ENOMEM; break; }; } err = copy_from_user(req, argp, sizeof(struct ubi_rnvol_req)); if (err) { Loading
drivers/mtd/ubi/debug.c +1 −1 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ int ubi_debugfs_init(void) dfs_rootdir = debugfs_create_dir("ubi", NULL); if (IS_ERR_OR_NULL(dfs_rootdir)) { int err = dfs_rootdir ? -ENODEV : PTR_ERR(dfs_rootdir); int err = dfs_rootdir ? PTR_ERR(dfs_rootdir) : -ENODEV; pr_err("UBI error: cannot create \"ubi\" debugfs directory, error %d\n", err); Loading
drivers/mtd/ubi/eba.c +1 −1 Original line number Diff line number Diff line Loading @@ -1358,7 +1358,7 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap, continue; ubi_err(ubi, "LEB:%i:%i is PEB:%i instead of %i!", vol->vol_id, i, fm_eba[i][j], vol->vol_id, j, fm_eba[i][j], scan_eba[i][j]); ubi_assert(0); } Loading
drivers/mtd/ubi/fastmap-wl.c +29 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,30 @@ void ubi_refill_pools(struct ubi_device *ubi) spin_unlock(&ubi->wl_lock); } /** * produce_free_peb - produce a free physical eraseblock. * @ubi: UBI device description object * * This function tries to make a free PEB by means of synchronous execution of * pending works. This may be needed if, for example the background thread is * disabled. Returns zero in case of success and a negative error code in case * of failure. */ static int produce_free_peb(struct ubi_device *ubi) { int err; while (!ubi->free.rb_node && ubi->works_count) { dbg_wl("do one work synchronously"); err = do_work(ubi); if (err) return err; } return 0; } /** * ubi_wl_get_peb - get a physical eraseblock. * @ubi: UBI device description object Loading Loading @@ -213,6 +237,11 @@ again: } retried = 1; up_read(&ubi->fm_eba_sem); ret = produce_free_peb(ubi); if (ret < 0) { down_read(&ubi->fm_eba_sem); goto out; } goto again; } Loading