Skip to content

Commit

Permalink
core: REE FS: ree_fs_truncate() commit dirh writes
Browse files Browse the repository at this point in the history
To commit the changes done by ree_fs_truncate() in the dirfile, call
commit_dirh_writes() before closing the dirh.

Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
  • Loading branch information
jenswi-linaro authored and takuya-sakata committed May 28, 2018
1 parent 04d6768 commit 3f84915
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/tee/tee_ree_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,9 @@ static TEE_Result ree_fs_truncate(struct tee_file_handle *fh, size_t len)
goto out;

res = tee_fs_dirfile_update_hash(dirh, &fdp->dfh);

if (res)
goto out;
res = commit_dirh_writes(dirh);
out:
put_dirh(dirh, res);
mutex_unlock(&ree_fs_mutex);
Expand Down

0 comments on commit 3f84915

Please sign in to comment.