projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c78a83
)
Fix potential oops in file unlocking at free time
author
Jens Axboe
<axboe@kernel.dk>
Thu, 23 Jan 2014 00:27:32 +0000
(16:27 -0800)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 23 Jan 2014 00:27:32 +0000
(16:27 -0800)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 601df8f1ddec655b09ec8eb7b2d03947307a8e65..d67f1124618744db85595c2f037ffe07f9788794 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-1050,6
+1050,7
@@
void close_and_free_files(struct thread_data *td)
td->files_index = 0;
td->files = NULL;
td->file_locks = NULL;
+ td->o.file_lock_mode = FILE_LOCK_NONE;
td->o.nr_files = 0;
}
@@
-1242,6
+1243,8
@@
void unlock_file(struct thread_data *td, struct fio_file *f)
void unlock_file_all(struct thread_data *td, struct fio_file *f)
{
+ if (td->o.file_lock_mode == FILE_LOCK_NONE)
+ return;
if (td->file_locks[f->fileno] != FILE_LOCK_NONE)
unlock_file(td, f);
}