diff options
author | David Sterba <dsterba@suse.com> | 2019-03-27 11:19:55 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-07-02 06:30:47 -0400 |
commit | 38e9372e391deabf19c76c88b59b5e16f304627a (patch) | |
tree | 0e648b96e037425d587abc6b7ab4cd0086815aa3 | |
parent | 93ead46b038037cd717cf46c9170af2531a6eb58 (diff) |
btrfs: assert delayed ref lock in btrfs_find_delayed_ref_head
Turn the comment about required lock into an assertion.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/delayed-ref.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index a73fc23e2961..a94fae897b3f 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c | |||
@@ -957,13 +957,14 @@ int btrfs_add_delayed_extent_op(struct btrfs_trans_handle *trans, | |||
957 | } | 957 | } |
958 | 958 | ||
959 | /* | 959 | /* |
960 | * this does a simple search for the head node for a given extent. | 960 | * This does a simple search for the head node for a given extent. Returns the |
961 | * It must be called with the delayed ref spinlock held, and it returns | 961 | * head node if found, or NULL if not. |
962 | * the head node if any where found, or NULL if not. | ||
963 | */ | 962 | */ |
964 | struct btrfs_delayed_ref_head * | 963 | struct btrfs_delayed_ref_head * |
965 | btrfs_find_delayed_ref_head(struct btrfs_delayed_ref_root *delayed_refs, u64 bytenr) | 964 | btrfs_find_delayed_ref_head(struct btrfs_delayed_ref_root *delayed_refs, u64 bytenr) |
966 | { | 965 | { |
966 | lockdep_assert_held(&delayed_refs->lock); | ||
967 | |||
967 | return find_ref_head(delayed_refs, bytenr, false); | 968 | return find_ref_head(delayed_refs, bytenr, false); |
968 | } | 969 | } |
969 | 970 | ||