On Sat, May 12, 2018 at 07:49:21AM +0300, Amir Goldstein wrote: > :-/ this pattern is too nasty to be open codes twice in ovl and > once in knfsd. > For ovl, we can hoist this into the ovl_do_mkdir() helper, but > what filesystems really need is vfs_mkdir_hashed(), then knfsd > can use it as well. Not really - handling of that case is really different for different callers, especially if you look into the "it's managed to disappear in between ->mkdir and ->lookup" case. Passing by reference seriously limits what the callers can do; if it works for overlayfs, more power to you, but it's not a good general-purpose helper.