diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-05-15 03:48:21 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-17 21:40:34 -0400 |
commit | b216cbfb52c08300c203abf06ea9519d15d10045 (patch) | |
tree | 095d3affbe72c1066606d8f6e45fc4bc00e4f850 /fs/btrfs | |
parent | 314297c2a3fbcbda992507f70cd04cc82084e434 (diff) |
Btrfs: don't invoke btrfs_invalidate_inodes() in the spin lock context
btrfs_invalidate_inodes() may sleep, so we should not invoke it in the
spin lock context. Fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 9b9f28664b4f..1b03f8393a69 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -3658,8 +3658,11 @@ static void btrfs_destroy_ordered_operations(struct btrfs_transaction *t, | |||
3658 | ordered_operations); | 3658 | ordered_operations); |
3659 | 3659 | ||
3660 | list_del_init(&btrfs_inode->ordered_operations); | 3660 | list_del_init(&btrfs_inode->ordered_operations); |
3661 | spin_unlock(&root->fs_info->ordered_extent_lock); | ||
3661 | 3662 | ||
3662 | btrfs_invalidate_inodes(btrfs_inode->root); | 3663 | btrfs_invalidate_inodes(btrfs_inode->root); |
3664 | |||
3665 | spin_lock(&root->fs_info->ordered_extent_lock); | ||
3663 | } | 3666 | } |
3664 | 3667 | ||
3665 | spin_unlock(&root->fs_info->ordered_extent_lock); | 3668 | spin_unlock(&root->fs_info->ordered_extent_lock); |
@@ -3781,8 +3784,11 @@ static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root) | |||
3781 | list_del_init(&btrfs_inode->delalloc_inodes); | 3784 | list_del_init(&btrfs_inode->delalloc_inodes); |
3782 | clear_bit(BTRFS_INODE_IN_DELALLOC_LIST, | 3785 | clear_bit(BTRFS_INODE_IN_DELALLOC_LIST, |
3783 | &btrfs_inode->runtime_flags); | 3786 | &btrfs_inode->runtime_flags); |
3787 | spin_unlock(&root->fs_info->delalloc_lock); | ||
3784 | 3788 | ||
3785 | btrfs_invalidate_inodes(btrfs_inode->root); | 3789 | btrfs_invalidate_inodes(btrfs_inode->root); |
3790 | |||
3791 | spin_lock(&root->fs_info->delalloc_lock); | ||
3786 | } | 3792 | } |
3787 | 3793 | ||
3788 | spin_unlock(&root->fs_info->delalloc_lock); | 3794 | spin_unlock(&root->fs_info->delalloc_lock); |