backref.c (e0b7661d44dab027febaf37f6f7766a3007af932) backref.c (fcba0120edf88328524a4878d1d6f4ad39f2ec81)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2011 STRATO. All rights reserved.
4 */
5
6#include <linux/mm.h>
7#include <linux/rbtree.h>
8#include <trace/events/btrfs.h>

--- 1196 unchanged lines hidden (view full) ---

1205 path->skip_locking = 1;
1206
1207again:
1208 head = NULL;
1209
1210 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
1211 if (ret < 0)
1212 goto out;
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2011 STRATO. All rights reserved.
4 */
5
6#include <linux/mm.h>
7#include <linux/rbtree.h>
8#include <trace/events/btrfs.h>

--- 1196 unchanged lines hidden (view full) ---

1205 path->skip_locking = 1;
1206
1207again:
1208 head = NULL;
1209
1210 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
1211 if (ret < 0)
1212 goto out;
1213 BUG_ON(ret == 0);
1213 if (ret == 0) {
1214 /* This shouldn't happen, indicates a bug or fs corruption. */
1215 ASSERT(ret != 0);
1216 ret = -EUCLEAN;
1217 goto out;
1218 }
1214
1215 if (trans && likely(trans->type != __TRANS_DUMMY) &&
1216 time_seq != BTRFS_SEQ_LAST) {
1217 /*
1218 * We have a specific time_seq we care about and trans which
1219 * means we have the path lock, we need to grab the ref head and
1220 * lock it so we have a consistent view of the refs at the given
1221 * time.

--- 1897 unchanged lines hidden ---
1219
1220 if (trans && likely(trans->type != __TRANS_DUMMY) &&
1221 time_seq != BTRFS_SEQ_LAST) {
1222 /*
1223 * We have a specific time_seq we care about and trans which
1224 * means we have the path lock, we need to grab the ref head and
1225 * lock it so we have a consistent view of the refs at the given
1226 * time.

--- 1897 unchanged lines hidden ---