提交 dd7e0b7b 编写于 作者: S Sage Weil 提交者: Chris Mason

Btrfs: fix deadlock with free space handling and user transactions

If an ioctl-initiated transaction is open, we can't force a commit during
the free space checks in order to free up pinned extents or else we
deadlock.  Just ENOSPC instead.

A more satisfying solution that reserves space for the entire user
transaction up front is forthcoming...
Signed-off-by: NSage Weil <sage@newdream.net>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 1ab86aed
......@@ -3168,7 +3168,7 @@ int btrfs_check_data_free_space(struct btrfs_root *root, struct inode *inode,
spin_unlock(&data_sinfo->lock);
/* commit the current transaction and try again */
if (!committed) {
if (!committed && !root->fs_info->open_ioctl_trans) {
committed = 1;
trans = btrfs_join_transaction(root, 1);
if (!trans)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册