]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Use mas_lock/unlock
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 13 Oct 2019 03:20:48 +0000 (23:20 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:28:13 +0000 (12:28 -0500)
If we've got a maple state, use the convenience wrappers instead of
open-coding it.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
lib/maple_tree.c

index 590a2eee3f36d234635fb6dc56b18b4d20491826..350551179c33be5453cf30b69d8eb9c9854680af 100644 (file)
@@ -4034,13 +4034,13 @@ int mtree_store_range(struct maple_tree *mt, unsigned long first,
        if (first > last)
                return -EINVAL;
 
-       mtree_lock(mas.tree);
+       mas_lock(&mas);
 retry:
        mas_add(&mas, entry, true, true);
        if (mas_nomem(&mas, gfp))
                goto retry;
 
-       mtree_unlock(mas.tree);
+       mas_unlock(&mas);
        if (mas_is_err(&mas))
                return xa_err(mas.node);