Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / drivers / infiniband / core / rdma_core.c
index a6e904973ba8a08973340b66f608eadfa04e2893..475910ffbcb6800f2e729f012b795483cbcc5c15 100644 (file)
@@ -121,7 +121,7 @@ static int uverbs_try_lock_object(struct ib_uobject *uobj, bool exclusive)
         * this lock.
         */
        if (!exclusive)
-               return __atomic_add_unless(&uobj->usecnt, 1, -1) == -1 ?
+               return atomic_fetch_add_unless(&uobj->usecnt, 1, -1) == -1 ?
                        -EBUSY : 0;
 
        /* lock is either WRITE or DESTROY - should be exclusive */