projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
56f9498
)
[PATCH] Only unlink the same file once
author
Jens Axboe
<jens.axboe@oracle.com>
Tue, 24 Oct 2006 08:27:38 +0000
(10:27 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 24 Oct 2006 08:27:38 +0000
(10:27 +0200)
If filename= is used, make sure we only do the unlink() once.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 4310a79f7e6e513b341324c3b2aa3679ffa39219..52d822ac4b6c8fb1bff042fd56aae96e0846c9da 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-404,8
+404,11
@@
void close_files(struct thread_data *td)
for_each_file(td, f, i) {
if (f->fd != -1) {
- if (td->unlink && td->filetype == FIO_TYPE_FILE)
+ if (td->unlink && td->filetype == FIO_TYPE_FILE &&
+ td->filename) {
unlink(f->file_name);
+ td->filename = NULL;
+ }
free(f->file_name);
f->file_name = NULL;
close(f->fd);