On Wed 29-11-23 22:07:09, Amir Goldstein wrote: > The two callers of do_splice_direct() hold file_start_write() on the > output file. > > This may cause file permission hooks to be called indirectly on an > overlayfs lower layer, which is on the same filesystem of the output > file and could lead to deadlock with fanotify permission events. > > To fix this potential deadlock, move file_start_write() from the callers > into the direct_splice_actor(), so file_start_write() will not be held > while reading the input file. > > Suggested-by: Josef Bacik <josef@xxxxxxxxxxxxxx> > Link: https://lore.kernel.org/r/20231128214258.GA2398475@perftesting/ > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> Yeah, very nice solution! It all looks good to me so feel free to add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR