]> 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>
Fri, 30 Oct 2020 18:56:25 +0000 (14:56 -0400)
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);