Skip to content

Commit 03f275a

Browse files
amir73ilbrauner
authored andcommitted
fuse: respect FOPEN_KEEP_CACHE on opendir
The re-factoring of fuse_dir_open() missed the need to invalidate directory inode page cache with open flag FOPEN_KEEP_CACHE. Fixes: 7de64d5 ("fuse: break up fuse_open_common()") Reported-by: Prince Kumar <[email protected]> Closes: https://lore.kernel.org/linux-fsdevel/CAEW=TRr7CYb4LtsvQPLj-zx5Y+EYBmGfM24SuzwyDoGVNoKm7w@mail.gmail.com/ Signed-off-by: Amir Goldstein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bernd Schubert <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 5fe85a5 commit 03f275a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/fuse/dir.c

+2
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,8 @@ static int fuse_dir_open(struct inode *inode, struct file *file)
16811681
*/
16821682
if (ff->open_flags & (FOPEN_STREAM | FOPEN_NONSEEKABLE))
16831683
nonseekable_open(inode, file);
1684+
if (!(ff->open_flags & FOPEN_KEEP_CACHE))
1685+
invalidate_inode_pages2(inode->i_mapping);
16841686
}
16851687

16861688
return err;

0 commit comments

Comments
 (0)