]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-u-boot/ti-u-boot.git/commitdiff
fs: btrfs: skip xattrs in directory listing
authorMarek Behún <marek.behun@nic.cz>
Tue, 9 Feb 2021 18:05:07 +0000 (19:05 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 24 Feb 2021 21:51:48 +0000 (16:51 -0500)
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>
fs/btrfs/btrfs.c

index 346b2c4341c225d25a1e64ec4b74346a2f7baca9..6b4c5feb53f4ea7876514b43ac30c12cc9c2f030 100644 (file)
@@ -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) {