]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ubifs/super.c
UBIFS: create the name of the background thread in every case
[linux-2.6-omap-h63xx.git] / fs / ubifs / super.c
index 7562464ac83fba3c19101afea8cf9495bf6cd692..3f4902060c7a10aba197a73c07491b7aca4cc84e 100644 (file)
@@ -1024,14 +1024,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);