forked from Minki/linux
ubifs: Make use of the helper macro kthread_run()
Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
bc7849e280
commit
d98c6c35c8
@ -1367,7 +1367,7 @@ static int mount_ubifs(struct ubifs_info *c)
|
||||
sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, c->vi.vol_id);
|
||||
if (!c->ro_mount) {
|
||||
/* Create background thread */
|
||||
c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
|
||||
c->bgt = kthread_run(ubifs_bg_thread, c, "%s", c->bgt_name);
|
||||
if (IS_ERR(c->bgt)) {
|
||||
err = PTR_ERR(c->bgt);
|
||||
c->bgt = NULL;
|
||||
@ -1375,7 +1375,6 @@ static int mount_ubifs(struct ubifs_info *c)
|
||||
c->bgt_name, err);
|
||||
goto out_wbufs;
|
||||
}
|
||||
wake_up_process(c->bgt);
|
||||
}
|
||||
|
||||
err = ubifs_read_master(c);
|
||||
@ -1780,7 +1779,7 @@ static int ubifs_remount_rw(struct ubifs_info *c)
|
||||
goto out;
|
||||
|
||||
/* Create background thread */
|
||||
c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
|
||||
c->bgt = kthread_run(ubifs_bg_thread, c, "%s", c->bgt_name);
|
||||
if (IS_ERR(c->bgt)) {
|
||||
err = PTR_ERR(c->bgt);
|
||||
c->bgt = NULL;
|
||||
@ -1788,7 +1787,6 @@ static int ubifs_remount_rw(struct ubifs_info *c)
|
||||
c->bgt_name, err);
|
||||
goto out;
|
||||
}
|
||||
wake_up_process(c->bgt);
|
||||
|
||||
c->orph_buf = vmalloc(c->leb_size);
|
||||
if (!c->orph_buf) {
|
||||
|
Loading…
Reference in New Issue
Block a user