aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dir-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r--fs/btrfs/dir-item.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c
index b1629a5d73c8..0ee9945fb1b0 100644
--- a/fs/btrfs/dir-item.c
+++ b/fs/btrfs/dir-item.c
@@ -92,6 +92,7 @@ int btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
92 int cow = mod != 0; 92 int cow = mod != 0;
93 struct btrfs_disk_key *found_key; 93 struct btrfs_disk_key *found_key;
94 struct btrfs_leaf *leaf; 94 struct btrfs_leaf *leaf;
95 u32 overflow;
95 96
96 key.objectid = dir; 97 key.objectid = dir;
97 key.flags = 0; 98 key.flags = 0;
@@ -119,8 +120,10 @@ int btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
119 if (btrfs_match_dir_item_name(root, path, name, name_len)) 120 if (btrfs_match_dir_item_name(root, path, name, name_len))
120 return 0; 121 return 0;
121 122
122 if (btrfs_disk_key_overflow(found_key) == 0) 123 overflow = btrfs_disk_key_overflow(found_key);
124 if (overflow == 0)
123 return 1; 125 return 1;
126 btrfs_set_key_overflow(&key, overflow - 1);
124 btrfs_release_path(root, path); 127 btrfs_release_path(root, path);
125 } 128 }
126 return 1; 129 return 1;