Patch "fuse: respect FOPEN_KEEP_CACHE on opendir" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    fuse: respect FOPEN_KEEP_CACHE on opendir

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fuse-respect-fopen_keep_cache-on-opendir.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8f41839c65f944923d5454abb246f67c871987e2
Author: Amir Goldstein <amir73il@xxxxxxxxx>
Date:   Wed Jan 1 14:00:37 2025 +0100

    fuse: respect FOPEN_KEEP_CACHE on opendir
    
    [ Upstream commit 03f275adb8fbd7b4ebe96a1ad5044d8e602692dc ]
    
    The re-factoring of fuse_dir_open() missed the need to invalidate
    directory inode page cache with open flag FOPEN_KEEP_CACHE.
    
    Fixes: 7de64d521bf92 ("fuse: break up fuse_open_common()")
    Reported-by: Prince Kumar <princer@xxxxxxxxxx>
    Closes: https://lore.kernel.org/linux-fsdevel/CAEW=TRr7CYb4LtsvQPLj-zx5Y+EYBmGfM24SuzwyDoGVNoKm7w@xxxxxxxxxxxxxx/
    Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20250101130037.96680-1-amir73il@xxxxxxxxx
    Reviewed-by: Bernd Schubert <bernd.schubert@xxxxxxxxxxx>
    Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 54104dd48af7..2e62e62c07f8 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1680,6 +1680,8 @@ static int fuse_dir_open(struct inode *inode, struct file *file)
 		 */
 		if (ff->open_flags & (FOPEN_STREAM | FOPEN_NONSEEKABLE))
 			nonseekable_open(inode, file);
+		if (!(ff->open_flags & FOPEN_KEEP_CACHE))
+			invalidate_inode_pages2(inode->i_mapping);
 	}
 
 	return err;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux