diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-07-25 19:11:47 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-08-09 23:30:23 (GMT) |
commit | cfad392b22163eba71d882950e17d2c4d43b2bad (patch) | |
tree | 7a3807402e20389d22975e87291ad05a4f98665d /fs/btrfs/transaction.h | |
parent | f3b15ccdbb9a79781578249a63318805e55a6c34 (diff) | |
download | linux-fsl-qoriq-cfad392b22163eba71d882950e17d2c4d43b2bad.tar.xz |
Btrfs: check to see if root_list is empty before adding it to dead roots
A user reported a panic when running with autodefrag and deleting snapshots.
This is because we could end up trying to add the root to the dead roots list
twice. To fix this check to see if we are empty before adding ourselves to the
dead roots list. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r-- | fs/btrfs/transaction.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index 005b037..defbc42 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -143,7 +143,7 @@ int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid); int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans, struct btrfs_root *root); -int btrfs_add_dead_root(struct btrfs_root *root); +void btrfs_add_dead_root(struct btrfs_root *root); int btrfs_defrag_root(struct btrfs_root *root); int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root); int btrfs_commit_transaction(struct btrfs_trans_handle *trans, |