]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of rs-iomap
authorSean Hefty <sean.hefty@intel.com>
Thu, 25 Oct 2012 04:52:19 +0000 (21:52 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 25 Oct 2012 04:52:19 +0000 (21:52 -0700)
src/rsocket.c

index eb8b3f0d89c516e97dd7edef333175aa1ef6d0f0..f0c4c3556b78eb87c905d33f2b6d41a23946b5fc 100644 (file)
@@ -2319,7 +2319,7 @@ off_t riomap(int socket, void *buf, size_t len, int prot, int flags, off_t offse
        int access = IBV_ACCESS_LOCAL_WRITE;
 
        rs = idm_at(&idm, socket);
-       if (rs->cm_id->pd || (prot & ~(PROT_WRITE | PROT_NONE)))
+       if (!rs->cm_id->pd || (prot & ~(PROT_WRITE | PROT_NONE)))
                return ERR(EINVAL);
 
        fastlock_acquire(&rs->iomap_lock);