From: Cai Huoqing Date: Thu, 21 Oct 2021 08:43:43 +0000 (+0800) Subject: ubifs: Make use of the helper macro kthread_run() X-Git-Tag: v5.17-rc1~128^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d98c6c35c881b944933edd1bbc438aa1f12e3c47;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Richard Weinberger --- diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index f0fb25727d961..0e7f206c43cf1 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -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) {