diff options
author | Qu Wenruo <wqu@suse.com> | 2020-06-24 18:03:06 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-07 20:57:27 -0400 |
commit | 325dd1f642dd18b83a6d8df8f7e3ab066f3e7445 (patch) | |
tree | d549ce3a132bea7fe583e59e62c6cf116dfb32f2 /fs/btrfs/btrfs.h | |
parent | c921aa20c3682456b59574be8cf3df589d909950 (diff) | |
download | u-boot-325dd1f642dd18b83a6d8df8f7e3ab066f3e7445.tar.gz u-boot-325dd1f642dd18b83a6d8df8f7e3ab066f3e7445.tar.xz u-boot-325dd1f642dd18b83a6d8df8f7e3ab066f3e7445.zip |
fs: btrfs: Use btrfs_iter_dir() to replace btrfs_readdir()
Use extent buffer based infrastructure to re-implement btrfs_readdir().
Along this rework, some small corner cases fixed:
- Subvolume tree mtime
Mtime of a subvolume tree is recorded in its root item, since there is
no INODE_ITEM for it.
This needs extra search from tree root.
- Output the unknown type
If the DIR_ITEM is corrupted, at least don't try to access the memory
out of boundary.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'fs/btrfs/btrfs.h')
-rw-r--r-- | fs/btrfs/btrfs.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h index 53d53f310b..e36bd89827 100644 --- a/fs/btrfs/btrfs.h +++ b/fs/btrfs/btrfs.h @@ -43,13 +43,8 @@ u32 btrfs_decompress(u8 type, const char *, u32, char *, u32); int btrfs_read_superblock(void); /* dir-item.c */ -typedef int (*btrfs_readdir_callback_t)(const struct __btrfs_root *, - struct btrfs_dir_item *); - int __btrfs_lookup_dir_item(const struct __btrfs_root *, u64, const char *, int, struct btrfs_dir_item *); -int btrfs_readdir(const struct __btrfs_root *, u64, btrfs_readdir_callback_t); - /* root.c */ int btrfs_find_root(u64, struct __btrfs_root *, struct btrfs_root_item *); u64 btrfs_lookup_root_ref(u64, struct btrfs_root_ref *, char *); |