diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index ca4902c66dc43dd929dc827186e56e896ec814b4..ed67aa91914c41465dd20b0583c19c5a9ea165e6 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2565,10 +2565,8 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) ret = btrfs_punch_hole_lock_range(inode, lockstart, lockend, &cached_state); - if (ret) { - inode_unlock(inode); + if (ret) goto out_only_mutex; - } path = btrfs_alloc_path(); if (!path) {