summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-07-11 10:18:13 -0400
committerTom Rini <trini@konsulko.com>2022-07-11 14:58:57 -0400
commit36b661dc919da318c163a45f4a220d2e3d9db608 (patch)
tree268703050f58280feb3287d48eb0cedc974730e1 /fs
parente092e3250270a1016c877da7bdd9384f14b1321e (diff)
parent05a4859637567b13219efd6f1707fb236648b1b7 (diff)
downloadu-boot-36b661dc919da318c163a45f4a220d2e3d9db608.tar.gz
u-boot-36b661dc919da318c163a45f4a220d2e3d9db608.tar.bz2
u-boot-36b661dc919da318c163a45f4a220d2e3d9db608.zip
Merge branch 'next'
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c15
-rw-r--r--fs/cbfs/Kconfig1
-rw-r--r--fs/squashfs/sqfs.c2
-rw-r--r--fs/ubifs/super.c7
4 files changed, 14 insertions, 11 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d00b515333..0173d30cd8 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -546,15 +546,12 @@ static int lookup_data_extent(struct btrfs_root *root, struct btrfs_path *path,
/* Error or we're already at the file extent */
if (ret <= 0)
return ret;
- if (ret > 0) {
- /* Check previous file extent */
- ret = btrfs_previous_item(root, path, ino,
- BTRFS_EXTENT_DATA_KEY);
- if (ret < 0)
- return ret;
- if (ret > 0)
- goto check_next;
- }
+ /* Check previous file extent */
+ ret = btrfs_previous_item(root, path, ino, BTRFS_EXTENT_DATA_KEY);
+ if (ret < 0)
+ return ret;
+ if (ret > 0)
+ goto check_next;
/* Now the key.offset must be smaller than @file_offset */
btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
if (key.objectid != ino ||
diff --git a/fs/cbfs/Kconfig b/fs/cbfs/Kconfig
index 03980d830d..b6639928f4 100644
--- a/fs/cbfs/Kconfig
+++ b/fs/cbfs/Kconfig
@@ -9,6 +9,7 @@ config FS_CBFS
config SPL_FS_CBFS
bool "Enable CBFS (Coreboot Filesystem) in SPL"
+ depends on SPL
help
Define this to enable support for reading from a Coreboot
filesystem. This is a ROM-based filesystem used for accessing files
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index 9c1f87caca..74ca70c3ff 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -50,7 +50,7 @@ static int sqfs_read_sblk(struct squashfs_super_block **sblk)
if (sqfs_disk_read(0, 1, *sblk) != 1) {
free(*sblk);
- sblk = NULL;
+ *sblk = NULL;
return -EINVAL;
}
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index e3a4c0bca2..034c41a703 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1757,6 +1757,8 @@ void ubifs_umount(struct ubifs_info *c)
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);
@@ -2058,9 +2060,9 @@ static void ubifs_put_super(struct super_block *sb)
ubifs_umount(c);
#ifndef __UBOOT__
bdi_destroy(&c->bdi);
-#endif
ubi_close_volume(c->ubi);
mutex_unlock(&c->umount_mutex);
+#endif
}
#endif
@@ -2327,6 +2329,9 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
out_umount:
ubifs_umount(c);
+#ifdef __UBOOT__
+ goto out;
+#endif
out_unlock:
mutex_unlock(&c->umount_mutex);
#ifndef __UBOOT__