Skip to content

Commit d98c6c3

Browse files
caihuoqing1990richardweinberger
authored andcommitted
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 <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent bc7849e commit d98c6c3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/ubifs/super.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,15 +1367,14 @@ static int mount_ubifs(struct ubifs_info *c)
13671367
sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, c->vi.vol_id);
13681368
if (!c->ro_mount) {
13691369
/* Create background thread */
1370-
c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
1370+
c->bgt = kthread_run(ubifs_bg_thread, c, "%s", c->bgt_name);
13711371
if (IS_ERR(c->bgt)) {
13721372
err = PTR_ERR(c->bgt);
13731373
c->bgt = NULL;
13741374
ubifs_err(c, "cannot spawn \"%s\", error %d",
13751375
c->bgt_name, err);
13761376
goto out_wbufs;
13771377
}
1378-
wake_up_process(c->bgt);
13791378
}
13801379

13811380
err = ubifs_read_master(c);
@@ -1780,15 +1779,14 @@ static int ubifs_remount_rw(struct ubifs_info *c)
17801779
goto out;
17811780

17821781
/* Create background thread */
1783-
c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name);
1782+
c->bgt = kthread_run(ubifs_bg_thread, c, "%s", c->bgt_name);
17841783
if (IS_ERR(c->bgt)) {
17851784
err = PTR_ERR(c->bgt);
17861785
c->bgt = NULL;
17871786
ubifs_err(c, "cannot spawn \"%s\", error %d",
17881787
c->bgt_name, err);
17891788
goto out;
17901789
}
1791-
wake_up_process(c->bgt);
17921790

17931791
c->orph_buf = vmalloc(c->leb_size);
17941792
if (!c->orph_buf) {

0 commit comments

Comments
 (0)