hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
u-boot/fs/ubifs/super.c
....@@ -1749,6 +1749,8 @@
17491749 kfree(c->bottom_up_buf);
17501750 ubifs_debugging_exit(c);
17511751 #ifdef __UBOOT__
1752
+ ubi_close_volume(c->ubi);
1753
+ mutex_unlock(&c->umount_mutex);
17521754 /* Finally free U-Boot's global copy of superblock */
17531755 if (ubifs_sb != NULL) {
17541756 free(ubifs_sb->s_fs_info);
....@@ -2050,9 +2052,9 @@
20502052 ubifs_umount(c);
20512053 #ifndef __UBOOT__
20522054 bdi_destroy(&c->bdi);
2053
-#endif
20542055 ubi_close_volume(c->ubi);
20552056 mutex_unlock(&c->umount_mutex);
2057
+#endif
20562058 }
20572059 #endif
20582060
....@@ -2319,6 +2321,9 @@
23192321
23202322 out_umount:
23212323 ubifs_umount(c);
2324
+#ifdef __UBOOT__
2325
+ goto out;
2326
+#endif
23222327 out_unlock:
23232328 mutex_unlock(&c->umount_mutex);
23242329 #ifndef __UBOOT__
....@@ -2356,7 +2361,9 @@
23562361 return ERR_PTR(err);
23572362 }
23582363
2364
+#ifndef __UBOOT__
23592365 INIT_HLIST_NODE(&s->s_instances);
2366
+#endif
23602367 INIT_LIST_HEAD(&s->s_inodes);
23612368 s->s_time_gran = 1000000000;
23622369 s->s_flags = flags;
....@@ -2425,14 +2432,12 @@
24252432 #ifndef __UBOOT__
24262433 strlcpy(s->s_id, type->name, sizeof(s->s_id));
24272434 list_add_tail(&s->s_list, &super_blocks);
2428
-#else
2429
- strncpy(s->s_id, type->name, sizeof(s->s_id));
2430
-#endif
24312435 hlist_add_head(&s->s_instances, &type->fs_supers);
2432
-#ifndef __UBOOT__
24332436 spin_unlock(&sb_lock);
24342437 get_filesystem(type);
24352438 register_shrinker(&s->s_shrink);
2439
+#else
2440
+ strncpy(s->s_id, type->name, sizeof(s->s_id));
24362441 #endif
24372442 return s;
24382443 }
....@@ -2457,7 +2462,7 @@
24572462 */
24582463 ubi = open_ubi(name, UBI_READONLY);
24592464 if (IS_ERR(ubi)) {
2460
- pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
2465
+ pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d\n",
24612466 current->pid, name, (int)PTR_ERR(ubi));
24622467 return ERR_CAST(ubi);
24632468 }
....@@ -2599,7 +2604,7 @@
25992604 * UBIFS_BLOCK_SIZE. It is assumed that both are powers of 2.
26002605 */
26012606 if (PAGE_CACHE_SIZE < UBIFS_BLOCK_SIZE) {
2602
- pr_err("UBIFS error (pid %d): VFS page cache size is %u bytes, but UBIFS requires at least 4096 bytes",
2607
+ pr_err("UBIFS error (pid %d): VFS page cache size is %u bytes, but UBIFS requires at least 4096 bytes\n",
26032608 current->pid, (unsigned int)PAGE_CACHE_SIZE);
26042609 return -EINVAL;
26052610 }
....@@ -2628,7 +2633,7 @@
26282633
26292634 err = register_filesystem(&ubifs_fs_type);
26302635 if (err) {
2631
- pr_err("UBIFS error (pid %d): cannot register file system, error %d",
2636
+ pr_err("UBIFS error (pid %d): cannot register file system, error %d\n",
26322637 current->pid, err);
26332638 goto out_dbg;
26342639 }