From 9df731a176aab8e03b984b681b1bea01ccff6644 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 06 Nov 2023 07:23:06 +0000 Subject: [PATCH] rk3568 rt uboot init --- u-boot/fs/ubifs/super.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/u-boot/fs/ubifs/super.c b/u-boot/fs/ubifs/super.c index effa8d9..b7f39cc 100644 --- a/u-boot/fs/ubifs/super.c +++ b/u-boot/fs/ubifs/super.c @@ -1749,6 +1749,8 @@ kfree(c->bottom_up_buf); ubifs_debugging_exit(c); #ifdef __UBOOT__ + ubi_close_volume(c->ubi); + mutex_unlock(&c->umount_mutex); /* Finally free U-Boot's global copy of superblock */ if (ubifs_sb != NULL) { free(ubifs_sb->s_fs_info); @@ -2050,9 +2052,9 @@ ubifs_umount(c); #ifndef __UBOOT__ bdi_destroy(&c->bdi); -#endif ubi_close_volume(c->ubi); mutex_unlock(&c->umount_mutex); +#endif } #endif @@ -2319,6 +2321,9 @@ out_umount: ubifs_umount(c); +#ifdef __UBOOT__ + goto out; +#endif out_unlock: mutex_unlock(&c->umount_mutex); #ifndef __UBOOT__ @@ -2356,7 +2361,9 @@ return ERR_PTR(err); } +#ifndef __UBOOT__ INIT_HLIST_NODE(&s->s_instances); +#endif INIT_LIST_HEAD(&s->s_inodes); s->s_time_gran = 1000000000; s->s_flags = flags; @@ -2425,14 +2432,12 @@ #ifndef __UBOOT__ strlcpy(s->s_id, type->name, sizeof(s->s_id)); list_add_tail(&s->s_list, &super_blocks); -#else - strncpy(s->s_id, type->name, sizeof(s->s_id)); -#endif hlist_add_head(&s->s_instances, &type->fs_supers); -#ifndef __UBOOT__ spin_unlock(&sb_lock); get_filesystem(type); register_shrinker(&s->s_shrink); +#else + strncpy(s->s_id, type->name, sizeof(s->s_id)); #endif return s; } @@ -2457,7 +2462,7 @@ */ ubi = open_ubi(name, UBI_READONLY); if (IS_ERR(ubi)) { - pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d", + pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d\n", current->pid, name, (int)PTR_ERR(ubi)); return ERR_CAST(ubi); } @@ -2599,7 +2604,7 @@ * UBIFS_BLOCK_SIZE. It is assumed that both are powers of 2. */ if (PAGE_CACHE_SIZE < UBIFS_BLOCK_SIZE) { - pr_err("UBIFS error (pid %d): VFS page cache size is %u bytes, but UBIFS requires at least 4096 bytes", + pr_err("UBIFS error (pid %d): VFS page cache size is %u bytes, but UBIFS requires at least 4096 bytes\n", current->pid, (unsigned int)PAGE_CACHE_SIZE); return -EINVAL; } @@ -2628,7 +2633,7 @@ err = register_filesystem(&ubifs_fs_type); if (err) { - pr_err("UBIFS error (pid %d): cannot register file system, error %d", + pr_err("UBIFS error (pid %d): cannot register file system, error %d\n", current->pid, err); goto out_dbg; } -- Gitblit v1.6.2