summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2017-07-18 15:34:02 -0400
committerDavid Sterba <dsterba@suse.com>2017-07-19 14:38:16 -0400
commite33bf72361bdd764c827e160249a3e06d2a8e2fe (patch)
treecaf6d7e4cb0a11c45d6879268265da6240d7177c /fs
parentc3cfb656307583ddfea45375c10183737593c195 (diff)
Btrfs: fix dir item validation when replaying xattr deletes
We were passing an incorrect slot number to the function that validates directory items when we are replaying xattr deletes from a log tree. The correct slot is stored at variable 'i' and not at 'path->slots[0]', so the call to the validation function was only correct for the first iteration of the loop, when 'i == path->slots[0]'. After this fix, the fstest generic/066 passes again. Fixes: 8ee8c2d62d5f ("btrfs: Verify dir_item in replay_xattr_deletes") Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/tree-log.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index f20ef211a73d..3a11ae63676e 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2153,8 +2153,7 @@ process_leaf:
2153 u32 this_len = sizeof(*di) + name_len + data_len; 2153 u32 this_len = sizeof(*di) + name_len + data_len;
2154 char *name; 2154 char *name;
2155 2155
2156 ret = verify_dir_item(fs_info, path->nodes[0], 2156 ret = verify_dir_item(fs_info, path->nodes[0], i, di);
2157 path->slots[0], di);
2158 if (ret) { 2157 if (ret) {
2159 ret = -EIO; 2158 ret = -EIO;
2160 goto out; 2159 goto out;