From: Matthew Wilcox (Oracle) Date: Sun, 13 Oct 2019 03:20:48 +0000 (-0400) Subject: maple_tree: Use mas_lock/unlock X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=11d26e7e29f8f8dbcd0e62fd0bfefa92cea823e5;p=users%2Fjedix%2Flinux-maple.git maple_tree: Use mas_lock/unlock If we've got a maple state, use the convenience wrappers instead of open-coding it. Signed-off-by: Matthew Wilcox (Oracle) --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 590a2eee3f36..350551179c33 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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);