aboutsummaryrefslogtreecommitdiffstats
path: root/lib/assoc_array.c
diff options
context:
space:
mode:
authorJosef Bacik <[email protected]>2020-08-10 21:31:16 +0000
committerDavid Sterba <[email protected]>2020-08-21 10:20:01 +0000
commitfb2fecbad50964b9f27a3b182e74e437b40753ef (patch)
tree2efd22fc10d9d3a57c42ab1846de39735dbb796a /lib/assoc_array.c
parentbtrfs: fix space cache memory leak after transaction abort (diff)
downloadkernel-fb2fecbad50964b9f27a3b182e74e437b40753ef.tar.gz
kernel-fb2fecbad50964b9f27a3b182e74e437b40753ef.zip
btrfs: check the right error variable in btrfs_del_dir_entries_in_log
With my new locking code dbench is so much faster that I tripped over a transaction abort from ENOSPC. This turned out to be because btrfs_del_dir_entries_in_log was checking for ret == -ENOSPC, but this function sets err on error, and returns err. So instead of properly marking the inode as needing a full commit, we were returning -ENOSPC and aborting in __btrfs_unlink_inode. Fix this by checking the proper variable so that we return the correct thing in the case of ENOSPC. The ENOENT needs to be checked, because btrfs_lookup_dir_item_index() can return -ENOENT if the dir item isn't in the tree log (which would happen if we hadn't fsync'ed this guy). We actually handle that case in __btrfs_unlink_inode, so it's an expected error to get back. Fixes: 4a500fd178c8 ("Btrfs: Metadata ENOSPC handling for tree log") CC: [email protected] # 4.4+ Reviewed-by: Filipe Manana <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> [ add note and comment about ENOENT ] Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'lib/assoc_array.c')
0 files changed, 0 insertions, 0 deletions