summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2021-02-09 19:05:07 +0100
committerTom Rini <trini@konsulko.com>2021-02-24 16:51:48 -0500
commite4cecb56677c42077fae48928f9cd5ce18e8a3a2 (patch)
tree72b71ea10b79bfdefee8b22d9d850a024b01a012 /fs
parent402558b1fe604baaa4aa4b3e1c72a65692861f2a (diff)
downloadu-boot-e4cecb56677c42077fae48928f9cd5ce18e8a3a2.tar.gz
fs: btrfs: skip xattrs in directory listing
Skip xattrs in directory listing. U-Boot filesystem drivers do not list xattrs. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Cc: David Sterba <dsterba@suse.com> Cc: Qu Wenruo <wqu@suse.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Qu Wenruo <wqu@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/btrfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index 346b2c4341..6b4c5feb53 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -29,7 +29,6 @@ static int show_dir(struct btrfs_root *root, struct extent_buffer *eb,
[BTRFS_FT_FIFO] = "FIFO",
[BTRFS_FT_SOCK] = "SOCK",
[BTRFS_FT_SYMLINK] = "SYMLINK",
- [BTRFS_FT_XATTR] = "XATTR"
};
u8 type = btrfs_dir_type(eb, di);
char namebuf[BTRFS_NAME_LEN];
@@ -38,6 +37,10 @@ static int show_dir(struct btrfs_root *root, struct extent_buffer *eb,
time_t mtime;
int ret = 0;
+ /* skip XATTRs in directory listing */
+ if (type == BTRFS_FT_XATTR)
+ return 0;
+
btrfs_dir_item_key_to_cpu(eb, di, &key);
if (key.type == BTRFS_ROOT_ITEM_KEY) {