bench: fix use of fd after close
This commit is contained in:
parent
d85c85aac1
commit
ed5bad754c
@ -51,7 +51,6 @@ static void writetest(int size, size_t bsize)
|
|||||||
exit(254);
|
exit(254);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(fd);
|
|
||||||
|
|
||||||
#ifndef NSYNC
|
#ifndef NSYNC
|
||||||
# ifdef __linux__
|
# ifdef __linux__
|
||||||
@ -61,6 +60,8 @@ static void writetest(int size, size_t bsize)
|
|||||||
# endif
|
# endif
|
||||||
#endif /* SYNC */
|
#endif /* SYNC */
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
|
||||||
end = now();
|
end = now();
|
||||||
elapsed = (end - start) / 1e6;
|
elapsed = (end - start) / 1e6;
|
||||||
mbps = ((tsize/elapsed)) / 1048576;
|
mbps = ((tsize/elapsed)) / 1048576;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user