diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8938174e6bc1f32a9c046f5f972e2b3ba8163eeb..6349c63a4b37935df3c8fc7e5bd76f30c411e8e6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6566,8 +6566,9 @@ static int btrfs_truncate(struct inode *inode) /* Just need the 1 for updating the inode */ trans = btrfs_start_transaction(root, 1); if (IS_ERR(trans)) { - err = PTR_ERR(trans); - goto out; + ret = err = PTR_ERR(trans); + trans = NULL; + break; } }