On Sat, Oct 06, 2018 at 07:15:31AM +0300, Amir Goldstein wrote: > +static int ovl_link_tmpfile(struct ovl_copy_up_ctx *c, struct dentry *temp, > + struct dentry **newdentry) > +{ > + int err; > + struct dentry *upper = NULL; > + struct inode *udir = d_inode(c->destdir); > + > + inode_lock_nested(udir, I_MUTEX_PARENT); > + upper = lookup_one_len(c->destname.name, c->destdir, c->destname.len); > + err = PTR_ERR(upper); > + if (IS_ERR(upper)) > + goto out; dput(ERR_PTR(something)) will immediately oops on you...