btrfs: check for BTRFS_FS_ERROR in pending ordered assert
[linux-2.6-microblaze.git] / fs / btrfs / ordered-data.c
index b46ab34..345c449 100644 (file)
@@ -639,7 +639,7 @@ void btrfs_remove_ordered_extent(struct btrfs_inode *btrfs_inode,
                        refcount_inc(&trans->use_count);
                spin_unlock(&fs_info->trans_lock);
 
-               ASSERT(trans);
+               ASSERT(trans || BTRFS_FS_ERROR(fs_info));
                if (trans) {
                        if (atomic_dec_and_test(&trans->pending_ordered))
                                wake_up(&trans->pending_wait);