summaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-10-21 16:43:43 +0800
committerRichard Weinberger <richard@nod.at>2021-12-23 20:23:41 +0100
commitd98c6c35c881b944933edd1bbc438aa1f12e3c47 (patch)
treec419a24d052a6a7dd10e365a5bd8c260264cbd51 /fs/ubifs
parentbc7849e280434289936b5cbe1b3701336741aba9 (diff)
downloadlinux-stable-d98c6c35c881b944933edd1bbc438aa1f12e3c47.tar.gz
linux-stable-d98c6c35c881b944933edd1bbc438aa1f12e3c47.tar.bz2
linux-stable-d98c6c35c881b944933edd1bbc438aa1f12e3c47.zip
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>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/super.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index f0fb25727d96..0e7f206c43cf 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) {