On Fri, Oct 04, 2024 at 12:23:41PM +0200, Amir Goldstein wrote: > if (upper_meta) { > ovl_path_upper(dentry, &realpath); > if (!realpath.dentry) > - return 0; > + return NULL; > } else { > /* lazy lookup and verify of lowerdata */ > err = ovl_verify_lowerdata(dentry); > if (err) > - return err; > + return ERR_PTR(err); Ugh... That kind of calling conventions is generally a bad idea. > + return realfile; ... especially since it's NULL/ERR_PTR()/pointer to object. > + realfile = ovl_real_file_meta(file, !datasync); > + if (IS_ERR_OR_NULL(realfile)) > + return PTR_ERR(realfile); Please, don't. IS_ERR_OR_NULL is bogus 9 times out of 10 (at least). And you still have breakage in llseek et.al.