diff options
| author | 2011-07-27 00:54:47 -0700 | |
|---|---|---|
| committer | 2011-07-27 00:54:47 -0700 | |
| commit | aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece (patch) | |
| tree | 3f9e98fadd5124fb05e8f6f9b06aa23698d4f215 /fs/btrfs/locking.c | |
| parent | Input: sh_keysc - fix compile warning (diff) | |
| parent | Input: synaptics - fix reporting of min coordinates (diff) | |
| download | linux-dev-aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece.tar.xz linux-dev-aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece.zip | |
Merge branch 'next' into for-linus
Diffstat (limited to 'fs/btrfs/locking.c')
| -rw-r--r-- | fs/btrfs/locking.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 6151f2ea38bb..66fa43dc3f0f 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -185,31 +185,6 @@ sleep: return 0; } -/* - * Very quick trylock, this does not spin or schedule. It returns - * 1 with the spinlock held if it was able to take the lock, or it - * returns zero if it was unable to take the lock. - * - * After this call, scheduling is not safe without first calling - * btrfs_set_lock_blocking() - */ -int btrfs_try_tree_lock(struct extent_buffer *eb) -{ - if (spin_trylock(&eb->lock)) { - if (test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags)) { - /* - * we've got the spinlock, but the real owner is - * blocking. Drop the spinlock and return failure - */ - spin_unlock(&eb->lock); - return 0; - } - return 1; - } - /* someone else has the spinlock giveup */ - return 0; -} - int btrfs_tree_unlock(struct extent_buffer *eb) { /* |
