btrfs: remove pointless BUG_ON() when creating snapshot
[linux-2.6-block.git] / fs / btrfs / transaction.c
index 85f359e0e0a7f2ea078157c85a1f78b0ea2bcadd..9c5663b43b1cdb98e3fb567ddabd5436a4410901 100644 (file)
@@ -1863,8 +1863,6 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
        ret = btrfs_insert_dir_item(trans, &fname.disk_name,
                                    BTRFS_I(parent_inode), &key, BTRFS_FT_DIR,
                                    index);
-       /* We have check then name at the beginning, so it is impossible. */
-       BUG_ON(ret == -EEXIST || ret == -EOVERFLOW);
        if (ret) {
                btrfs_abort_transaction(trans, ret);
                goto fail;