Skip to content

Commit c0cefb2

Browse files
zhangjayceebergwolf
authored andcommitted
Vfs: remove no opendir flags correctly
Like the commit 345bc09, we should also remove ZERO_MESSAGE_OPENDIR when no_opendir is disabled, otherwise, passthroughfs would always set its no_opendir to true. Fixes: 345bc09 Reported-by: Daowen Luo <[email protected]> Signed-off-by: Jiachen Zhang <[email protected]>
1 parent 2696460 commit c0cefb2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/vfs/sync_io.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ impl FileSystem for Vfs {
2525
} else {
2626
n_opts.out_opts.remove(FsOptions::ZERO_MESSAGE_OPEN);
2727
}
28-
n_opts.no_opendir = !(opts & FsOptions::ZERO_MESSAGE_OPENDIR).is_empty();
28+
if n_opts.no_opendir {
29+
n_opts.no_opendir = !(opts & FsOptions::ZERO_MESSAGE_OPENDIR).is_empty();
30+
} else {
31+
n_opts.out_opts.remove(FsOptions::ZERO_MESSAGE_OPENDIR);
32+
}
2933
if n_opts.no_writeback {
3034
n_opts.out_opts.remove(FsOptions::WRITEBACK_CACHE);
3135
}

0 commit comments

Comments
 (0)