projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b4e954
)
Only attempt file unlock if we use locking
author
Jens Axboe
<axboe@kernel.dk>
Thu, 21 Mar 2013 16:06:58 +0000
(10:06 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 21 Mar 2013 16:06:58 +0000
(10:06 -0600)
Fixes a segfault on exit, if file locking isn't used.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
ioengines.c
patch
|
blob
|
blame
|
history
diff --git
a/ioengines.c
b/ioengines.c
index 234f8edd13251ab07e7f7b431d3d90279c4c9b9a..4d1491cf079b5a504a22aad46965ade8c95bc6c8 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-475,7
+475,9
@@
int td_io_close_file(struct thread_data *td, struct fio_file *f)
fio_file_set_closing(f);
disk_util_dec(f->du);
- unlock_file_all(td, f);
+
+ if (td->o.file_lock_mode != FILE_LOCK_NONE)
+ unlock_file_all(td, f);
return put_file(td, f);
}