Skip to content

Commit

Permalink
fixup! [LibOS] Update mmapped regions when writing to encrypted files
Browse files Browse the repository at this point in the history
Signed-off-by: Kailun Qin <kailun.qin@intel.com>
  • Loading branch information
kailun-qin committed Nov 23, 2023
1 parent 49faaeb commit fc9f497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libos/src/bookkeep/libos_vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,14 +1373,14 @@ static bool vma_filter_needs_msync(struct libos_vma* vma, void* arg) {

static bool vma_filter_needs_reload(struct libos_vma* vma, void* arg) {
struct libos_handle* hdl = arg;
assert(hdl && hdl->inode); /* guaranteed to have inode because invoked from `write` callback */

if (vma->flags & (VMA_UNMAPPED | VMA_INTERNAL | MAP_ANONYMOUS | MAP_PRIVATE))
return false;

assert(vma->file && vma->file->inode);
assert(hdl && hdl->inode);
assert(vma->file); /* check above filtered out non-file-backed mappings */

if (vma->file->inode != hdl->inode)
if (!vma->file->inode || vma->file->inode != hdl->inode)
return false;

if (!vma->file->fs || !vma->file->fs->fs_ops || !vma->file->fs->fs_ops->read)
Expand Down

0 comments on commit fc9f497

Please sign in to comment.