Skip to content

Commit

Permalink
Make should_fsync() taking a constant.
Browse files Browse the repository at this point in the history
Make `should_fsync()` safer by using a pointer to a constant
thread_data structure instance.

Signed-off-by: Roman Sofin [email protected]
  • Loading branch information
Roman Sofin committed Aug 13, 2024
1 parent 55b10cc commit 656357f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fio.h
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ static inline bool multi_range_trim(struct thread_data *td, struct io_u *io_u)
return false;
}

static inline bool should_fsync(struct thread_data *td)
static inline bool should_fsync(const struct thread_data *td)
{
if (ddir_sync(td->last_ddir_issued))
return false;
Expand Down

0 comments on commit 656357f

Please sign in to comment.