Lines Matching refs:newdentry
142 struct dentry **newdentry, umode_t mode) in ovl_mkdir_real() argument
145 struct dentry *d, *dentry = *newdentry; in ovl_mkdir_real()
167 *newdentry = d; in ovl_mkdir_real()
173 struct dentry *newdentry, struct ovl_cattr *attr) in ovl_create_real() argument
177 if (IS_ERR(newdentry)) in ovl_create_real()
178 return newdentry; in ovl_create_real()
181 if (newdentry->d_inode) in ovl_create_real()
185 err = ovl_do_link(ofs, attr->hardlink, dir, newdentry); in ovl_create_real()
189 err = ovl_do_create(ofs, dir, newdentry, attr->mode); in ovl_create_real()
194 err = ovl_mkdir_real(ofs, dir, &newdentry, attr->mode); in ovl_create_real()
201 err = ovl_do_mknod(ofs, dir, newdentry, attr->mode, in ovl_create_real()
206 err = ovl_do_symlink(ofs, dir, newdentry, attr->link); in ovl_create_real()
213 if (!err && WARN_ON(!newdentry->d_inode)) { in ovl_create_real()
222 dput(newdentry); in ovl_create_real()
225 return newdentry; in ovl_create_real()
264 struct dentry *newdentry, bool hardlink, struct file *tmpfile) in ovl_instantiate() argument
267 .upperdentry = newdentry, in ovl_instantiate()
272 ovl_dentry_init_reval(dentry, newdentry, NULL); in ovl_instantiate()
293 WARN_ON(ovl_inode_real(inode) != d_inode(newdentry)); in ovl_instantiate()
294 dput(newdentry); in ovl_instantiate()
330 struct dentry *newdentry; in ovl_create_upper() local
334 newdentry = ovl_create_real(ofs, udir, in ovl_create_upper()
338 err = PTR_ERR(newdentry); in ovl_create_upper()
339 if (IS_ERR(newdentry)) in ovl_create_upper()
342 if (ovl_type_merge(dentry->d_parent) && d_is_dir(newdentry) && in ovl_create_upper()
345 ovl_set_opaque(dentry, newdentry); in ovl_create_upper()
349 err = ovl_instantiate(dentry, inode, newdentry, !!attr->hardlink, NULL); in ovl_create_upper()
357 ovl_cleanup(ofs, udir, newdentry); in ovl_create_upper()
358 dput(newdentry); in ovl_create_upper()
455 struct dentry *newdentry; in ovl_create_over_whiteout() local
484 newdentry = ovl_create_temp(ofs, workdir, cattr); in ovl_create_over_whiteout()
485 err = PTR_ERR(newdentry); in ovl_create_over_whiteout()
486 if (IS_ERR(newdentry)) in ovl_create_over_whiteout()
494 newdentry->d_inode->i_mode != cattr->mode) { in ovl_create_over_whiteout()
499 inode_lock(newdentry->d_inode); in ovl_create_over_whiteout()
500 err = ovl_do_notify_change(ofs, newdentry, &attr); in ovl_create_over_whiteout()
501 inode_unlock(newdentry->d_inode); in ovl_create_over_whiteout()
506 err = ovl_set_upper_acl(ofs, newdentry, in ovl_create_over_whiteout()
511 err = ovl_set_upper_acl(ofs, newdentry, in ovl_create_over_whiteout()
518 err = ovl_set_opaque(dentry, newdentry); in ovl_create_over_whiteout()
522 err = ovl_do_rename(ofs, wdir, newdentry, udir, upper, in ovl_create_over_whiteout()
529 err = ovl_do_rename(ofs, wdir, newdentry, udir, upper, 0); in ovl_create_over_whiteout()
534 err = ovl_instantiate(dentry, inode, newdentry, hardlink, NULL); in ovl_create_over_whiteout()
536 ovl_cleanup(ofs, udir, newdentry); in ovl_create_over_whiteout()
537 dput(newdentry); in ovl_create_over_whiteout()
551 ovl_cleanup(ofs, wdir, newdentry); in ovl_create_over_whiteout()
552 dput(newdentry); in ovl_create_over_whiteout()
1087 struct dentry *newdentry; in ovl_rename() local
1211 newdentry = ovl_lookup_upper(ofs, new->d_name.name, new_upperdir, in ovl_rename()
1213 err = PTR_ERR(newdentry); in ovl_rename()
1214 if (IS_ERR(newdentry)) in ovl_rename()
1223 if (newdentry != opaquedir) in ovl_rename()
1226 if (!ovl_matches_upper(new, newdentry)) in ovl_rename()
1230 if (!d_is_negative(newdentry)) { in ovl_rename()
1231 if (!new_opaque || !ovl_upper_is_whiteout(ofs, newdentry)) in ovl_rename()
1241 if (newdentry == trap) in ovl_rename()
1244 if (olddentry->d_inode == newdentry->d_inode) in ovl_rename()
1259 err = ovl_set_opaque_xerr(new, newdentry, -EXDEV); in ovl_rename()
1264 new_upperdir->d_inode, newdentry, flags); in ovl_rename()
1269 ovl_cleanup(ofs, old_upperdir->d_inode, newdentry); in ovl_rename()
1289 dput(newdentry); in ovl_rename()
1312 struct dentry *newdentry; in ovl_create_tmpfile() local
1331 newdentry = dget(realfile->f_path.dentry); in ovl_create_tmpfile()
1332 err = ovl_instantiate(dentry, inode, newdentry, false, file); in ovl_create_tmpfile()
1336 dput(newdentry); in ovl_create_tmpfile()