VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Chad Austin <chadaustin@fb.com> 2019-01-28 16:34:34 -0800 committer: Miklos Szeredi <mszeredi@redhat.com> 2019-02-13 13:15:15 +0100 commit: fabf7e0262d0bd57739d29aeac94c44b0542ff1f parent: d9a9ea94f748f47b1d75c6c5e33edcf74476c445
Commit Summary:
fuse: cache readdir calls if filesystem opts out of opendir
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index cc6ffd23b80f..06096b60f1df 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;