On Mon, Oct 07, 2024 at 05:56:51PM +0200, Amir Goldstein wrote: > You are right (again) I open code it, it looks much better: > > /* Don't sync lower file for fear of receiving EROFS error */ > - upperfile = ovl_upper_file(file, datasync); > - if (IS_ERR_OR_NULL(upperfile)) > + type = ovl_path_type(dentry); > + if (!OVL_TYPE_UPPER(type) || (datasync && OVL_TYPE_MERGE(type))) > + return 0; > + > + ovl_path_upper(dentry, &upperpath); OK, this answers my other question (re why skipping ovl_verify_lowerdata() in ovl_upper_file() is OK); you don't want to mess with the lowerdata anyway, so...