]> 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)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 13 Oct 2019 03:26:31 +0000 (23:26 -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 12ebb48b10a35c0ead7db63e5512420dd6b146b7..1d6b370ef4d7da20fcec08dbbae4b197ca8123f9 100644 (file)
@@ -4058,13 +4058,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:
        ma_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);