Message ID | 1828884A29C6694DAF28B7E6B8A8237346A8995C@ORSMSX101.amr.corp.intel.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
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;
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 <sean.hefty@intel.com> --- src/preload.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html