Re: [PATCH v4 2/5] btrfs: change error handling for btrfs_delete_*_in_log
From: David Sterba <hidden>
Date: 2021-10-06 19:04:15
From: David Sterba <hidden>
Date: 2021-10-06 19:04:15
On Tue, Oct 05, 2021 at 04:35:24PM -0400, Josef Bacik wrote:
@@ -3565,49 +3565,36 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans, btrfs_free_path(path); out_unlock: mutex_unlock(&dir->log_mutex); - if (err == -ENOSPC) { + if (err < 0 && err != -ENOENT) btrfs_set_log_full_commit(trans); - err = 0; - } else if (err < 0 && err != -ENOENT) { - /* ENOENT can be returned if the entry hasn't been fsynced yet */ - btrfs_abort_transaction(trans, err);
There was a minor conflict with recent Filipe's cleanups simplifying the error and ENOENT values, in this case the 'err != -ENOENT' was dropped, so I resolved it by keeping the condition after Filipe's changes so the final result is if (err < 0) btrfs_set_log_full_commit(trans)