提交 7041ee97 编写于 作者: J Josef Bacik

Btrfs: fix leaked space in truncate

We were occasionaly leaking space when running xfstest 269.  This is because if
we failed to start the transaction in the truncate loop we'd just goto out, but
we need to break so that the inode is removed from the orphan list and the space
is properly freed.  Thanks,
Signed-off-by: NJosef Bacik <josef@redhat.com>
上级 660d3f6c
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册