/linux/fs/nfs/ |
H A D | unlink.c | 270 struct dentry *old_dentry = data->old_dentry; in nfs_async_rename_done() local 272 trace_nfs_async_rename_done(old_dir, old_dentry, in nfs_async_rename_done() 292 if (d_really_is_positive(data->old_dentry)) in nfs_async_rename_release() 293 nfs_mark_for_revalidate(d_inode(data->old_dentry)); in nfs_async_rename_release() 308 dput(data->old_dentry); in nfs_async_rename_release() 341 struct dentry *old_dentry, struct dentry *new_dentry, in nfs_async_rename() argument 375 data->old_dentry = dget(old_dentry); in nfs_async_rename() 383 data->args.old_name = &old_dentry->d_name; in nfs_async_rename() 393 NFS_PROTO(data->old_dir)->rename_setup(&msg, old_dentry, new_dentry); in nfs_async_rename() 405 struct dentry *dentry = data->old_dentry; in nfs_complete_sillyrename()
|
/linux/fs/jffs2/ |
H A D | dir.c | 248 static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct dentry *dentry) in jffs2_link() argument 250 struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dentry->d_sb); in jffs2_link() 251 struct jffs2_inode_info *f = JFFS2_INODE_INFO(d_inode(old_dentry)); in jffs2_link() 261 if (d_is_dir(old_dentry)) in jffs2_link() 265 type = (d_inode(old_dentry)->i_mode & S_IFMT) >> 12; in jffs2_link() 273 set_nlink(d_inode(old_dentry), ++f->inocache->pino_nlink); in jffs2_link() 275 d_instantiate(dentry, d_inode(old_dentry)); in jffs2_link() 278 ihold(d_inode(old_dentry)); in jffs2_link() 773 struct inode *old_dir_i, struct dentry *old_dentry, in jffs2_rename() argument 815 type = (d_inode(old_dentry)->i_mode & S_IFMT) >> 12; in jffs2_rename() [all …]
|
/linux/fs/affs/ |
H A D | namei.c | 394 affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) in affs_link() argument 396 struct inode *inode = d_inode(old_dentry); in affs_link() 405 affs_rename(struct inode *old_dir, struct dentry *old_dentry, in affs_rename() argument 414 affs_nofilenametruncate(old_dentry)); in affs_rename() 426 bh = affs_bread(sb, d_inode(old_dentry)->i_ino); in affs_rename() 452 affs_xrename(struct inode *old_dir, struct dentry *old_dentry, in affs_xrename() argument 461 bh_old = affs_bread(sb, d_inode(old_dentry)->i_ino); in affs_xrename() 493 affs_copy_name(AFFS_TAIL(sb, bh_new)->name, old_dentry); in affs_xrename() 507 struct dentry *old_dentry, struct inode *new_dir, in affs_rename2() argument 515 old_dir->i_ino, old_dentry, new_dir->i_ino, new_dentry); in affs_rename2() [all …]
|
/linux/fs/debugfs/ |
H A D | inode.c | 858 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument 869 if (IS_ERR_OR_NULL(old_dentry)) in debugfs_rename() 870 return old_dentry; in debugfs_rename() 877 if (d_really_is_negative(old_dentry) || old_dentry == trap || in debugfs_rename() 878 d_mountpoint(old_dentry)) in debugfs_rename() 885 take_dentry_name_snapshot(&old_name, old_dentry); in debugfs_rename() 887 error = simple_rename(&nop_mnt_idmap, d_inode(old_dir), old_dentry, in debugfs_rename() 893 d_move(old_dentry, dentry); in debugfs_rename() 895 d_is_dir(old_dentry), in debugfs_rename() 896 NULL, old_dentry); in debugfs_rename() [all …]
|
/linux/fs/f2fs/ |
H A D | namei.c | 398 static int f2fs_link(struct dentry *old_dentry, struct inode *dir, in f2fs_link() argument 401 struct inode *inode = d_inode(old_dentry); in f2fs_link() 410 err = fscrypt_prepare_link(old_dentry, dir, dentry); in f2fs_link() 416 F2FS_I(old_dentry->d_inode)->i_projid))) in f2fs_link() 886 struct dentry *old_dentry, struct inode *new_dir, in f2fs_rename() argument 890 struct inode *old_inode = d_inode(old_dentry); in f2fs_rename() 908 F2FS_I(old_dentry->d_inode)->i_projid))) in f2fs_rename() 928 err = f2fs_setup_filename(old_dir, &old_dentry->d_name, in f2fs_rename() 953 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename() 1037 err = f2fs_add_link(old_dentry, whiteout); in f2fs_rename() [all …]
|
/linux/fs/sysv/ |
H A D | namei.c | 101 static int sysv_link(struct dentry * old_dentry, struct inode * dir, in sysv_link() argument 104 struct inode *inode = d_inode(old_dentry); in sysv_link() 192 struct dentry *old_dentry, struct inode *new_dir, in sysv_rename() argument 195 struct inode * old_inode = d_inode(old_dentry); in sysv_rename() 206 old_de = sysv_find_entry(old_dentry, &old_folio); in sysv_rename()
|
/linux/fs/ |
H A D | libfs.c | 378 int simple_offset_rename(struct inode *old_dir, struct dentry *old_dentry, in simple_offset_rename() argument 385 simple_offset_remove(old_ctx, old_dentry); in simple_offset_rename() 389 return simple_offset_replace(new_ctx, old_dentry, new_offset); in simple_offset_rename() 391 return simple_offset_add(new_ctx, old_dentry); in simple_offset_rename() 408 struct dentry *old_dentry, in simple_offset_rename_exchange() argument 414 long old_index = dentry2offset(old_dentry); in simple_offset_rename_exchange() 418 simple_offset_remove(old_ctx, old_dentry); in simple_offset_rename_exchange() 421 ret = simple_offset_replace(new_ctx, old_dentry, new_index); in simple_offset_rename_exchange() 427 simple_offset_remove(new_ctx, old_dentry); in simple_offset_rename_exchange() 431 ret = simple_rename_exchange(old_dir, old_dentry, new_dir, new_dentry); in simple_offset_rename_exchange() [all …]
|
H A D | bad_inode.c | 43 static int bad_inode_link (struct dentry *old_dentry, struct inode *dir, in bad_inode_link() argument 79 struct inode *old_dir, struct dentry *old_dentry, in bad_inode_rename2() argument
|
/linux/fs/minix/ |
H A D | namei.c | 96 static int minix_link(struct dentry * old_dentry, struct inode * dir, in minix_link() argument 99 struct inode *inode = d_inode(old_dentry); in minix_link() 177 struct inode *old_dir, struct dentry *old_dentry, in minix_rename() argument 181 struct inode * old_inode = d_inode(old_dentry); in minix_rename() 192 old_de = minix_find_entry(old_dentry, &old_folio); in minix_rename()
|
/linux/security/landlock/ |
H A D | fs.c | 1088 static int current_check_refer_path(struct dentry *const old_dentry, in current_check_refer_path() argument 1105 if (unlikely(d_is_negative(old_dentry))) in current_check_refer_path() 1116 get_mode_access(d_backing_inode(old_dentry)->i_mode); in current_check_refer_path() 1118 access_request_parent1 |= maybe_remove(old_dentry); in current_check_refer_path() 1123 if (old_dentry->d_parent == new_dir->dentry) { in current_check_refer_path() 1151 old_parent = (old_dentry == mnt_dir.dentry) ? old_dentry : in current_check_refer_path() 1152 old_dentry->d_parent; in current_check_refer_path() 1171 old_dentry, access_request_parent2, &layer_masks_parent2, in current_check_refer_path() 1388 static int hook_path_link(struct dentry *const old_dentry, in hook_path_link() argument 1392 return current_check_refer_path(old_dentry, new_dir, new_dentry, false, in hook_path_link() [all …]
|
/linux/fs/ufs/ |
H A D | namei.c | 150 static int ufs_link (struct dentry * old_dentry, struct inode * dir, in ufs_link() argument 153 struct inode *inode = d_inode(old_dentry); in ufs_link() 245 struct dentry *old_dentry, struct inode *new_dir, in ufs_rename() argument 248 struct inode *old_inode = d_inode(old_dentry); in ufs_rename() 259 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_folio); in ufs_rename()
|
/linux/fs/ubifs/ |
H A D | dir.c | 750 static int ubifs_link(struct dentry *old_dentry, struct inode *dir, in ubifs_link() argument 754 struct inode *inode = d_inode(old_dentry); in ubifs_link() 773 err = fscrypt_prepare_link(old_dentry, dir, dentry); in ubifs_link() 1321 static int do_rename(struct inode *old_dir, struct dentry *old_dentry, in do_rename() argument 1326 struct inode *old_inode = d_inode(old_dentry); in do_rename() 1353 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename() 1372 err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &old_nm); in do_rename() 1413 whiteout = create_whiteout(old_dir, old_dentry); in do_rename() 1450 simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); in do_rename() 1581 static int ubifs_xrename(struct inode *old_dir, struct dentry *old_dentry, in ubifs_xrename() argument [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | local_storage.c | 108 int BPF_PROG(inode_rename, struct inode *old_dir, struct dentry *old_dentry, in BPF_PROG() argument 122 storage = bpf_inode_storage_get(&inode_storage_map, old_dentry->d_inode, in BPF_PROG() 130 err = bpf_inode_storage_delete(&inode_storage_map, old_dentry->d_inode); in BPF_PROG()
|
/linux/fs/ext2/ |
H A D | namei.c | 204 static int ext2_link (struct dentry * old_dentry, struct inode * dir, in ext2_link() argument 207 struct inode *inode = d_inode(old_dentry); in ext2_link() 318 struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument 322 struct inode * old_inode = d_inode(old_dentry); in ext2_rename() 342 old_de = ext2_find_entry(old_dir, &old_dentry->d_name, &old_folio); in ext2_rename()
|
/linux/fs/hfs/ |
H A D | dir.c | 284 struct dentry *old_dentry, struct inode *new_dir, in hfs_rename() argument 299 res = hfs_cat_move(d_inode(old_dentry)->i_ino, in hfs_rename() 300 old_dir, &old_dentry->d_name, in hfs_rename() 304 (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key, in hfs_rename()
|
/linux/fs/ocfs2/ |
H A D | namei.c | 681 static int ocfs2_link(struct dentry *old_dentry, in ocfs2_link() argument 686 struct inode *inode = d_inode(old_dentry); in ocfs2_link() 687 struct inode *old_dir = d_inode(old_dentry->d_parent); in ocfs2_link() 699 old_dentry->d_name.len, old_dentry->d_name.name, in ocfs2_link() 737 err = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_link() 738 old_dentry->d_name.len, &old_de_ino); in ocfs2_link() 1204 struct dentry *old_dentry, in ocfs2_rename() argument 1211 struct inode *old_inode = d_inode(old_dentry); in ocfs2_rename() 1238 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename() 1239 old_dentry->d_name.len, old_dentry->d_name.name, in ocfs2_rename() [all …]
|
/linux/fs/9p/ |
H A D | vfs_inode.c | 868 struct dentry *old_dentry, struct inode *new_dir, in v9fs_vfs_rename() argument 884 old_inode = d_inode(old_dentry); in v9fs_vfs_rename() 887 oldfid = v9fs_fid_lookup(old_dentry); in v9fs_vfs_rename() 891 dfid = v9fs_parent_fid(old_dentry); in v9fs_vfs_rename() 913 retval = p9_client_renameat(olddirfid, old_dentry->d_name.name, in v9fs_vfs_rename() 921 if (old_dentry->d_parent != new_dentry->d_parent) { in v9fs_vfs_rename() 953 d_move(old_dentry, new_dentry); in v9fs_vfs_rename() 1276 v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir, in v9fs_vfs_link() argument 1284 dir->i_ino, dentry, old_dentry); in v9fs_vfs_link() 1286 oldfid = v9fs_fid_clone(old_dentry); in v9fs_vfs_link() [all …]
|
H A D | vfs_inode_dotl.c | 735 v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir, in v9fs_vfs_link_dotl() argument 743 dir->i_ino, old_dentry, dentry); in v9fs_vfs_link_dotl() 750 oldfid = v9fs_fid_lookup(old_dentry); in v9fs_vfs_link_dotl() 770 fid = v9fs_fid_lookup(old_dentry); in v9fs_vfs_link_dotl() 774 v9fs_refresh_inode_dotl(fid, d_inode(old_dentry)); in v9fs_vfs_link_dotl() 777 ihold(d_inode(old_dentry)); in v9fs_vfs_link_dotl() 778 d_instantiate(dentry, d_inode(old_dentry)); in v9fs_vfs_link_dotl()
|
/linux/security/tomoyo/ |
H A D | tomoyo.c | 264 static int tomoyo_path_link(struct dentry *old_dentry, const struct path *new_dir, in tomoyo_path_link() argument 267 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry }; in tomoyo_path_link() 285 struct dentry *old_dentry, in tomoyo_path_rename() argument 290 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry }; in tomoyo_path_rename()
|
/linux/include/linux/ |
H A D | fscrypt.h | 426 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, 748 struct dentry *old_dentry, in __fscrypt_prepare_rename() argument 957 static inline int fscrypt_prepare_link(struct dentry *old_dentry, in fscrypt_prepare_link() argument 962 return __fscrypt_prepare_link(d_inode(old_dentry), dir, dentry); in fscrypt_prepare_link() 989 struct dentry *old_dentry, in fscrypt_prepare_rename() argument 995 return __fscrypt_prepare_rename(old_dir, old_dentry, in fscrypt_prepare_rename()
|
/linux/fs/nilfs2/ |
H A D | namei.c | 193 static int nilfs_link(struct dentry *old_dentry, struct inode *dir, in nilfs_link() argument 196 struct inode *inode = d_inode(old_dentry); in nilfs_link() 362 struct inode *old_dir, struct dentry *old_dentry, in nilfs_rename() argument 366 struct inode *old_inode = d_inode(old_dentry); in nilfs_rename() 382 old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_folio); in nilfs_rename()
|
/linux/fs/fat/ |
H A D | namei_msdos.c | 429 struct dentry *old_dentry, in do_msdos_rename() argument 442 old_inode = d_inode(old_dentry); in do_msdos_rename() 598 struct inode *old_dir, struct dentry *old_dentry, in msdos_rename() argument 611 err = msdos_format_name(old_dentry->d_name.name, in msdos_rename() 612 old_dentry->d_name.len, old_msdos_name, in msdos_rename() 625 err = do_msdos_rename(old_dir, old_msdos_name, old_dentry, in msdos_rename()
|
H A D | namei_vfat.c | 931 static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename() argument 944 old_inode = d_inode(old_dentry); in vfat_rename() 947 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename() 1060 static int vfat_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename_exchange() argument 1071 old_inode = d_inode(old_dentry); in vfat_rename_exchange() 1162 struct dentry *old_dentry, struct inode *new_dir, in vfat_rename2() argument 1169 return vfat_rename_exchange(old_dir, old_dentry, in vfat_rename2() 1174 return vfat_rename(old_dir, old_dentry, new_dir, new_dentry); in vfat_rename2()
|
/linux/fs/crypto/ |
H A D | hooks.c | 89 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument 93 if (fscrypt_is_nokey_name(old_dentry) || in __fscrypt_prepare_rename() 104 d_inode(old_dentry))) in __fscrypt_prepare_rename()
|
/linux/fs/orangefs/ |
H A D | namei.c | 374 struct dentry *old_dentry, in orangefs_rename() argument 388 old_dentry, new_dentry, d_count(new_dentry)); in orangefs_rename() 402 strscpy(new_op->upcall.req.rename.d_old_name, old_dentry->d_name.name); in orangefs_rename() 407 get_interruptible_flag(old_dentry->d_inode)); in orangefs_rename()
|