Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346740
b: refs/heads/master
c: d639378
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Dec 17, 2012
1 parent ce14f5d commit 6bb4b5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b11e234d21e73df94099e473a080bca502b9a496
refs/heads/master: d6393786cd40f67709324bc4f08d7e4b911153fe
7 changes: 5 additions & 2 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2212,6 +2212,9 @@ static noinline void unlock_up(struct btrfs_path *path, int level,
int no_skips = 0;
struct extent_buffer *t;

if (path->really_keep_locks)
return;

for (i = level; i < BTRFS_MAX_LEVEL; i++) {
if (!path->nodes[i])
break;
Expand Down Expand Up @@ -2259,7 +2262,7 @@ noinline void btrfs_unlock_up_safe(struct btrfs_path *path, int level)
{
int i;

if (path->keep_locks)
if (path->keep_locks || path->really_keep_locks)
return;

for (i = level; i < BTRFS_MAX_LEVEL; i++) {
Expand Down Expand Up @@ -2492,7 +2495,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
if (!cow)
write_lock_level = -1;

if (cow && (p->keep_locks || p->lowest_level))
if (cow && (p->really_keep_locks || p->keep_locks || p->lowest_level))
write_lock_level = BTRFS_MAX_LEVEL;

min_write_lock_level = write_lock_level;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ struct btrfs_path {
unsigned int skip_locking:1;
unsigned int leave_spinning:1;
unsigned int search_commit_root:1;
unsigned int really_keep_locks:1;
};

/*
Expand Down

0 comments on commit 6bb4b5b

Please sign in to comment.