diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index cc6ffd23b80f75e2a5e069bb44a1572baff164c0..06096b60f1df23cb60234fe2fe3ce2ddc2b39c4e 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -124,7 +124,8 @@ int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file,
 		return -ENOMEM;
 
 	ff->fh = 0;
-	ff->open_flags = FOPEN_KEEP_CACHE; /* Default for no-open */
+	/* Default for no-open */
+	ff->open_flags = FOPEN_KEEP_CACHE | (isdir ? FOPEN_CACHE_DIR : 0);
 	if (isdir ? !fc->no_opendir : !fc->no_open) {
 		struct fuse_open_out outarg;
 		int err;