DORMANTno replies

[PATCH 1/7] librdmacm/rspreload: Call real.close in fd_close

From: Hefty, Sean <hidden>
Date: 2012-08-16 19:24:22
Subsystem: the rest · Maintainer: Linus Torvalds

The index into the preload lookup table is obtained by opening
/dev/null and use the returned value.  When closing the file,
use the real close call and not the preload close call.  This
is a minor optimization, but clarifies the expected operation.

Signed-off-by: Sean Hefty <redacted>
---
 src/preload.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/preload.c b/src/preload.c
index 52eaf1a..a680143 100644
--- a/src/preload.c
+++ b/src/preload.c
@@ -131,7 +131,7 @@ static int fd_open(void)
 	return index;
 
 err2:
-	close(index);
+	real.close(index);
 err1:
 	free(fdi);
 	return ret;
@@ -187,7 +187,7 @@ static enum fd_type fd_close(int index, int *fd)
 		idm_clear(&idm, index);
 		*fd = fdi->fd;
 		type = fdi->type;
-		close(index);
+		real.close(index);
 		free(fdi);
 	} else {
 		*fd = index;


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help