Commit 61155aa04ebcba6a33f2a281c46f351ca150d816
Committed by
Chris Mason
1 parent
521e0546c9
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
btrfs: assert that send is not in progres before root deletion
CC: Miao Xie <miaox@cn.fujitsu.com> CC: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Showing 2 changed files with 1 additions and 13 deletions Side-by-side Diff
fs/btrfs/ioctl.c
fs/btrfs/transaction.c
... | ... | @@ -1984,19 +1984,6 @@ |
1984 | 1984 | } |
1985 | 1985 | root = list_first_entry(&fs_info->dead_roots, |
1986 | 1986 | struct btrfs_root, root_list); |
1987 | - /* | |
1988 | - * Make sure root is not involved in send, | |
1989 | - * if we fail with first root, we return | |
1990 | - * directly rather than continue. | |
1991 | - */ | |
1992 | - spin_lock(&root->root_item_lock); | |
1993 | - if (root->send_in_progress) { | |
1994 | - spin_unlock(&fs_info->trans_lock); | |
1995 | - spin_unlock(&root->root_item_lock); | |
1996 | - return 0; | |
1997 | - } | |
1998 | - spin_unlock(&root->root_item_lock); | |
1999 | - | |
2000 | 1987 | list_del_init(&root->root_list); |
2001 | 1988 | spin_unlock(&fs_info->trans_lock); |
2002 | 1989 |