/linux-6.6.21/fs/nfs/ |
D | unlink.c | 267 struct inode *new_dir = data->new_dir; in nfs_async_rename_done() local 271 new_dir, data->new_dentry, task->tk_status); in nfs_async_rename_done() 272 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done() 299 if (data->new_dir != data->old_dir) { in nfs_async_rename_release() 300 spin_lock(&data->new_dir->i_lock); in nfs_async_rename_release() 301 nfs_force_lookup_revalidate(data->new_dir); in nfs_async_rename_release() 302 spin_unlock(&data->new_dir->i_lock); in nfs_async_rename_release() 309 iput(data->new_dir); in nfs_async_rename_release() 338 nfs_async_rename(struct inode *old_dir, struct inode *new_dir, in nfs_async_rename() argument 353 nfs_server_capable(new_dir, NFS_CAP_MOVEABLE)) in nfs_async_rename() [all …]
|
D | nfstrace.h | 798 const struct inode *new_dir, 802 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry), 807 __field(u64, new_dir) 815 __entry->new_dir = NFS_FILEID(new_dir); 826 (unsigned long long)__entry->new_dir, 835 const struct inode *new_dir, \ 838 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry)) 844 const struct inode *new_dir, 849 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error), 856 __field(u64, new_dir) [all …]
|
/linux-6.6.21/fs/affs/ |
D | namei.c | 406 struct inode *new_dir, struct dentry *new_dentry) in affs_rename() argument 440 affs_lock_dir(new_dir); in affs_rename() 441 retval = affs_insert_hash(new_dir, bh); in affs_rename() 442 affs_unlock_dir(new_dir); in affs_rename() 446 mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir); in affs_rename() 453 struct inode *new_dir, struct dentry *new_dentry) in affs_xrename() argument 479 affs_lock_dir(new_dir); in affs_xrename() 480 retval = affs_remove_hash(new_dir, bh_new); in affs_xrename() 481 affs_unlock_dir(new_dir); in affs_xrename() 488 affs_lock_dir(new_dir); in affs_xrename() [all …]
|
/linux-6.6.21/fs/f2fs/ |
D | namei.c | 954 struct dentry *old_dentry, struct inode *new_dir, in f2fs_rename() argument 973 if (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) && in f2fs_rename() 974 (!projid_eq(F2FS_I(new_dir)->i_projid, in f2fs_rename() 986 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 1002 err = f2fs_dquot_initialize(new_dir); in f2fs_rename() 1036 new_entry = f2fs_find_entry(new_dir, &new_dentry->d_name, in f2fs_rename() 1052 f2fs_set_link(new_dir, new_entry, new_page, old_inode); in f2fs_rename() 1078 f2fs_i_links_write(new_dir, true); in f2fs_rename() 1086 f2fs_i_pino_write(old_inode, new_dir->i_ino); in f2fs_rename() 1109 if (old_dir != new_dir) in f2fs_rename() [all …]
|
/linux-6.6.21/fs/ubifs/ |
D | dir.c | 1285 struct inode *new_dir, struct dentry *new_dentry, in do_rename() argument 1294 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename() 1317 new_dentry, new_dir->i_ino, flags); in do_rename() 1339 err = fscrypt_setup_filename(new_dir, &new_dentry->d_name, 0, &new_nm); in do_rename() 1411 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename() 1417 simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); in do_rename() 1432 inc_nlink(new_dir); in do_rename() 1463 new_dir->i_size += new_sz; in do_rename() 1464 ubifs_inode(new_dir)->ui_size = new_dir->i_size; in do_rename() 1473 sync = IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir); in do_rename() [all …]
|
/linux-6.6.21/fs/fat/ |
D | namei_vfat.c | 932 struct inode *new_dir, struct dentry *new_dentry) in vfat_rename() argument 951 if (old_dir != new_dir) { in vfat_rename() 968 err = vfat_add_entry(new_dir, &new_dentry->d_name, is_dir, 0, in vfat_rename() 974 inode_inc_iversion(new_dir); in vfat_rename() 978 err = vfat_sync_ipos(new_dir, old_inode); in vfat_rename() 983 err = vfat_update_dotdot_de(new_dir, old_inode, dotdot_bh, in vfat_rename() 989 inc_nlink(new_dir); in vfat_rename() 1032 int err2 = fat_remove_entries(new_dir, &sinfo); in vfat_rename() 1038 fat_fs_error(new_dir->i_sb, in vfat_rename() 1061 struct inode *new_dir, struct dentry *new_dentry) in vfat_rename_exchange() argument [all …]
|
D | namei_msdos.c | 430 struct inode *new_dir, unsigned char *new_name, in do_msdos_rename() argument 452 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename() 461 err = fat_scan(new_dir, new_name, &sinfo); in do_msdos_rename() 504 err = msdos_add_entry(new_dir, new_name, is_dir, is_hid, 0, in do_msdos_rename() 510 inode_inc_iversion(new_dir); in do_msdos_rename() 518 if (IS_DIRSYNC(new_dir)) { in do_msdos_rename() 526 fat_set_start(dotdot_de, MSDOS_I(new_dir)->i_logstart); in do_msdos_rename() 528 if (IS_DIRSYNC(new_dir)) { in do_msdos_rename() 535 inc_nlink(new_dir); in do_msdos_rename() 583 int err2 = fat_remove_entries(new_dir, &sinfo); in do_msdos_rename() [all …]
|
/linux-6.6.21/fs/jfs/ |
D | namei.c | 1068 struct dentry *old_dentry, struct inode *new_dir, in jfs_rename() argument 1096 rc = dquot_initialize(new_dir); in jfs_rename() 1121 rc = dtSearch(new_dir, &new_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename() 1153 tid = txBegin(new_dir->i_sb, 0); in jfs_rename() 1161 mutex_lock_nested(&JFS_IP(new_dir)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_rename() 1163 if (old_dir != new_dir) in jfs_rename() 1174 rc = dtModify(tid, new_dir, &new_dname, &ino, in jfs_rename() 1183 if (old_dir != new_dir) in jfs_rename() 1186 mutex_unlock(&JFS_IP(new_dir)->commit_mutex); in jfs_rename() 1215 rc = dtSearch(new_dir, &new_dname, &ino, &btstack, in jfs_rename() [all …]
|
/linux-6.6.21/fs/ufs/ |
D | namei.c | 247 struct dentry *old_dentry, struct inode *new_dir, in ufs_rename() argument 281 new_de = ufs_find_entry(new_dir, &new_dentry->d_name, &new_page); in ufs_rename() 284 ufs_set_link(new_dir, new_de, new_page, old_inode, 1); in ufs_rename() 294 inode_inc_link_count(new_dir); in ufs_rename() 307 if (old_dir != new_dir) in ufs_rename() 308 ufs_set_link(old_inode, dir_de, dir_page, new_dir, 0); in ufs_rename()
|
/linux-6.6.21/fs/ext2/ |
D | namei.c | 319 struct inode * new_dir, struct dentry * new_dentry, in ext2_rename() argument 337 err = dquot_initialize(new_dir); in ext2_rename() 360 new_de = ext2_find_entry(new_dir, &new_dentry->d_name, in ext2_rename() 366 err = ext2_set_link(new_dir, new_de, new_page, old_inode, true); in ext2_rename() 379 inode_inc_link_count(new_dir); in ext2_rename() 391 if (old_dir != new_dir) in ext2_rename() 393 new_dir, false); in ext2_rename()
|
/linux-6.6.21/fs/debugfs/ |
D | inode.c | 824 struct dentry *new_dir, const char *new_name) in debugfs_rename() argument 832 if (IS_ERR(new_dir)) in debugfs_rename() 833 return new_dir; in debugfs_rename() 837 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 839 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 845 dentry = lookup_one_len(new_name, new_dir, strlen(new_name)); in debugfs_rename() 853 d_inode(new_dir), dentry, 0); in debugfs_rename() 859 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 863 unlock_rename(new_dir, old_dir); in debugfs_rename() 869 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/linux-6.6.21/fs/hpfs/ |
D | namei.c | 507 struct dentry *old_dentry, struct inode *new_dir, in hpfs_rename() argument 552 if ((nde = map_dirent(new_dir, hpfs_i(new_dir)->i_dno, new_name, new_len, NULL, &qbh1))) { in hpfs_rename() 560 hpfs_error(new_dir->i_sb, "hpfs_rename: could not find dirent"); in hpfs_rename() 568 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 570 if ((r = hpfs_add_dirent(new_dir, new_name, new_len, &de))) { in hpfs_rename() 571 if (r == -1) hpfs_error(new_dir->i_sb, "hpfs_rename: dirent already exists!"); in hpfs_rename() 573 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 577 if (new_dir == old_dir) in hpfs_rename() 591 hpfs_i(i)->i_parent_dir = new_dir->i_ino; in hpfs_rename() 593 inc_nlink(new_dir); in hpfs_rename() [all …]
|
/linux-6.6.21/security/landlock/ |
D | fs.c | 814 const struct path *const new_dir, in current_check_refer_path() argument 848 if (old_dentry->d_parent == new_dir->dentry) { in current_check_refer_path() 857 dom, new_dir, access_request_parent1, in current_check_refer_path() 867 mnt_dir.mnt = new_dir->mnt; in current_check_refer_path() 868 mnt_dir.dentry = new_dir->mnt->mnt_root; in current_check_refer_path() 875 dom, mnt_dir.dentry, new_dir->dentry, &layer_masks_parent2); in current_check_refer_path() 1103 const struct path *const new_dir, in hook_path_link() argument 1106 return current_check_refer_path(old_dentry, new_dir, new_dentry, false, in hook_path_link() 1112 const struct path *const new_dir, in hook_path_rename() argument 1117 return current_check_refer_path(old_dentry, new_dir, new_dentry, true, in hook_path_rename()
|
/linux-6.6.21/fs/ntfs3/ |
D | namei.c | 252 struct dentry *dentry, struct inode *new_dir, in ntfs_rename() argument 259 struct ntfs_inode *new_dir_ni = ntfs_i(new_dir); in ntfs_rename() 286 if (is_same && dir == new_dir) { in ntfs_rename() 300 err = ntfs_unlink_inode(new_dir, new_dentry); in ntfs_rename() 339 simple_rename_timestamp(dir, dentry, new_dir, new_dentry); in ntfs_rename() 342 if (dir != new_dir) in ntfs_rename() 343 mark_inode_dirty(new_dir); in ntfs_rename() 348 if (IS_DIRSYNC(new_dir)) in ntfs_rename()
|
/linux-6.6.21/fs/ |
D | libfs.c | 324 struct inode *new_dir, in simple_offset_rename_exchange() argument 328 struct offset_ctx *new_ctx = new_dir->i_op->get_offset_ctx(new_dir); in simple_offset_rename_exchange() 346 ret = simple_rename_exchange(old_dir, old_dentry, new_dir, new_dentry); in simple_offset_rename_exchange() 717 struct inode *new_dir, struct dentry *new_dentry) in simple_rename_timestamp() argument 722 if (new_dir != old_dir) in simple_rename_timestamp() 723 inode_set_mtime_to_ts(new_dir, in simple_rename_timestamp() 724 inode_set_ctime_current(new_dir)); in simple_rename_timestamp() 732 struct inode *new_dir, struct dentry *new_dentry) in simple_rename_exchange() argument 737 if (old_dir != new_dir && old_is_dir != new_is_dir) { in simple_rename_exchange() 740 inc_nlink(new_dir); in simple_rename_exchange() [all …]
|
/linux-6.6.21/fs/nilfs2/ |
D | namei.c | 345 struct inode *new_dir, struct dentry *new_dentry, in nilfs_rename() argument 385 new_de = nilfs_find_entry(new_dir, &new_dentry->d_name, &new_page); in nilfs_rename() 388 nilfs_set_link(new_dir, new_de, new_page, old_inode); in nilfs_rename() 389 nilfs_mark_inode_dirty(new_dir); in nilfs_rename() 400 inc_nlink(new_dir); in nilfs_rename() 401 nilfs_mark_inode_dirty(new_dir); in nilfs_rename() 414 nilfs_set_link(old_inode, dir_de, dir_page, new_dir); in nilfs_rename()
|
/linux-6.6.21/fs/ocfs2/ |
D | namei.c | 1201 struct inode *new_dir, in ocfs2_rename() argument 1234 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename() 1243 status = dquot_initialize(new_dir); in ocfs2_rename() 1267 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename() 1277 status = ocfs2_check_if_ancestor(osb, new_dir->i_ino, in ocfs2_rename() 1286 (unsigned long long)new_dir->i_ino); in ocfs2_rename() 1293 &new_dir_bh, new_dir, 1); in ocfs2_rename() 1300 if (!new_dir->i_nlink) { in ocfs2_rename() 1356 if (!new_inode && new_dir != old_dir && in ocfs2_rename() 1357 new_dir->i_nlink >= ocfs2_link_max(osb)) { in ocfs2_rename() [all …]
|
D | dcache.c | 441 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument 453 if (old_dir == new_dir) in ocfs2_dentry_move() 459 ret = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(new_dir)->ip_blkno); in ocfs2_dentry_move()
|
/linux-6.6.21/fs/crypto/ |
D | hooks.c | 70 struct inode *new_dir, struct dentry *new_dentry, in __fscrypt_prepare_rename() argument 81 if (old_dir != new_dir) { in __fscrypt_prepare_rename() 82 if (IS_ENCRYPTED(new_dir) && in __fscrypt_prepare_rename() 83 !fscrypt_has_permitted_context(new_dir, in __fscrypt_prepare_rename()
|
/linux-6.6.21/fs/hfs/ |
D | dir.c | 284 struct dentry *old_dentry, struct inode *new_dir, in hfs_rename() argument 294 res = hfs_remove(new_dir, new_dentry); in hfs_rename() 301 new_dir, &new_dentry->d_name); in hfs_rename() 305 new_dir->i_ino, &new_dentry->d_name); in hfs_rename()
|
/linux-6.6.21/fs/exfat/ |
D | namei.c | 1303 struct inode *new_dir, struct dentry *new_dentry, in exfat_rename() argument 1323 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename() 1327 inode_inc_iversion(new_dir); in exfat_rename() 1328 simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); in exfat_rename() 1329 EXFAT_I(new_dir)->i_crtime = current_time(new_dir); in exfat_rename() 1330 exfat_truncate_atime(&new_dir->i_atime); in exfat_rename() 1331 if (IS_DIRSYNC(new_dir)) in exfat_rename() 1332 exfat_sync_inode(new_dir); in exfat_rename() 1334 mark_inode_dirty(new_dir); in exfat_rename() 1340 if (IS_DIRSYNC(new_dir)) in exfat_rename() [all …]
|
/linux-6.6.21/fs/sysv/ |
D | namei.c | 192 struct dentry *old_dentry, struct inode *new_dir, in sysv_rename() argument 242 inode_inc_link_count(new_dir); in sysv_rename() 252 err = sysv_set_link(dir_de, dir_page, new_dir); in sysv_rename()
|
/linux-6.6.21/fs/reiserfs/ |
D | namei.c | 1315 struct inode *new_dir, struct dentry *new_dentry, in reiserfs_rename() argument 1350 retval = dquot_initialize(new_dir); in reiserfs_rename() 1391 if (old_dir != new_dir) { in reiserfs_rename() 1424 reiserfs_add_entry(&th, new_dir, new_dentry->d_name.name, in reiserfs_rename() 1438 reiserfs_update_inode_transaction(new_dir); in reiserfs_rename() 1455 search_by_entry_key(new_dir->i_sb, &old_de.de_entry_key, in reiserfs_rename() 1471 reiserfs_find_entry(new_dir, new_dentry->d_name.name, in reiserfs_rename() 1494 search_by_entry_key(new_dir->i_sb, in reiserfs_rename() 1586 simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); in reiserfs_rename() 1600 set_ino_in_dir_entry(&dot_dot_de, INODE_PKEY(new_dir)); in reiserfs_rename() [all …]
|
/linux-6.6.21/fs/minix/ |
D | namei.c | 179 struct inode *new_dir, struct dentry *new_dentry, in minix_rename() argument 230 inode_inc_link_count(new_dir); in minix_rename() 240 err = minix_set_link(dir_de, dir_page, new_dir); in minix_rename()
|
/linux-6.6.21/include/linux/ |
D | fsnotify.h | 140 static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, in fsnotify_move() argument 165 new_dir, new_name, fs_cookie); in fsnotify_move() 170 audit_inode_child(new_dir, moved, AUDIT_TYPE_CHILD_CREATE); in fsnotify_move()
|