Re: [PATCH v14 03/10] fs: Export alloc_empty_backing_file

From: Christian Brauner

Date: Mon Jan 12 2026 - 04:10:38 EST


On Fri, Jan 09, 2026 at 10:28:49AM +0000, Hongbo Li wrote:
> There is no need to open nonexistent real files if backing files
> couldn't be backed by real files (e.g., EROFS page cache sharing
> doesn't need typical real files to open again).
>
> Therefore, we export the alloc_empty_backing_file() helper, allowing
> filesystems to dynamically set the backing file without real file
> open. This is particularly useful for obtaining the correct @path
> and @inode when calling file_user_path() and file_user_inode().
>
> Signed-off-by: Hongbo Li <lihongbo22@xxxxxxxxxx>
> Reviewed-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
> Acked-by: Amir Goldstein <amir73il@xxxxxxxxx>
> ---

Acked-by: Christian Brauner <brauner@xxxxxxxxxx>