Message ID | 20210201085204.700090-3-naohiro.aota@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix potential deadlock, types and typo in zoned series | expand |
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 1dd7e34fe484..ed101420934c 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3164,6 +3164,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, ret = btrfs_alloc_log_tree_node(trans, log_root_tree); if (ret) { mutex_unlock(&fs_info->tree_log_mutex); + mutex_unlock(&log_root_tree->log_mutex); goto out; } }
We need to unlock log_root_tree->log_mutex in case of an error. Fixes: 122cfba0d2eb ("btrfs: reorder log node allocation") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> --- fs/btrfs/tree-log.c | 1 + 1 file changed, 1 insertion(+)