Skip to contentSkip to conversation

ubifs: create the name of the background thread in every case

PATCH Applied Sebastian Siewior 2 participants 2 messages Sep 9, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubifs: create the name of the background thread in every case

If the ubifs partition is mounted RO and then remounted RW we end up with no thread name in ubifs_remount_rw() and the thread appears nameless.

---
 fs/ubifs/super.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
fs/ubifs/super.c +1 -2
index f71e6b8..2fcf272 100644
@@ -1018,14 +1018,13 @@ static int mount_ubifs(struct ubifs_info *c)
 		goto out_dereg;
 	}
 
+	sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, c->vi.vol_id);
 	if (!mounted_read_only) {
 		err = alloc_wbufs(c);
 		if (err)
 			goto out_cbuf;
 
 		/* Create background thread */
-		sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num,
-			c->vi.vol_id);
 		c->bgt = kthread_create(ubifs_bg_thread, c, c->bgt_name);
 		if (!c->bgt)
 			c->bgt = ERR_PTR(-EINVAL);
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 3 lines · Sebastian Siewior

If the ubifs partition is mounted RO and then remounted RW we end up with no thread name in ubifs_remount_rw() and the thread appears nameless.

Pushed to ubifs-2.6.git, thanks.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)