Hi all, This is v2 of the code to avoid temporary backing file opens in overlayfs, taking into account Al's comments on v1 [1]. Miklos, The implementation of ovl_real_file_path() helper is roughly based on ovl_real_dir_file(). do you see any problems with this approach or any races not handled? Note that I did have a logical bug in v1 (always choosing the stashed upperfile if it exists), so there may be more. Thanks, Amir. Changes since v1: - Use helpers ovl_real_file() and ovl_upper_file() to express that ovl_real_file() cannot return NULL - Fix readability and bug is code to select and store stashed upperfile [1] https://lore.kernel.org/linux-fsdevel/20241004102342.179434-1-amir73il@xxxxxxxxx/ Amir Goldstein (4): ovl: do not open non-data lower file for fsync ovl: stash upper real file in backing_file struct ovl: convert ovl_real_fdget_path() callers to ovl_real_file_path() ovl: convert ovl_real_fdget() callers to ovl_real_file() fs/file_table.c | 7 ++ fs/internal.h | 6 + fs/overlayfs/file.c | 288 ++++++++++++++++++++++++++------------------ 3 files changed, 182 insertions(+), 119 deletions(-) -- 2.34.1