/kernel/linux/linux-5.10/fs/nfs/ |
D | unlink.c | 261 struct inode *old_dir = data->old_dir; in nfs_async_rename_done() local 265 trace_nfs_sillyrename_rename(old_dir, old_dentry, in nfs_async_rename_done() 267 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done() 283 struct super_block *sb = data->old_dir->i_sb; in nfs_async_rename_release() 291 spin_lock(&data->old_dir->i_lock); in nfs_async_rename_release() 292 nfs_force_lookup_revalidate(data->old_dir); in nfs_async_rename_release() 293 spin_unlock(&data->old_dir->i_lock); in nfs_async_rename_release() 294 if (data->new_dir != data->old_dir) { in nfs_async_rename_release() 303 iput(data->old_dir); in nfs_async_rename_release() 313 NFS_PROTO(data->old_dir)->rename_rpc_prepare(task, data); in nfs_rename_prepare() [all …]
|
D | nfstrace.h | 739 const struct inode *old_dir, 745 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry), 749 __field(u64, old_dir) 756 __entry->dev = old_dir->i_sb->s_dev; 757 __entry->old_dir = NFS_FILEID(old_dir); 766 (unsigned long long)__entry->old_dir, 776 const struct inode *old_dir, \ 781 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry)) 785 const struct inode *old_dir, 792 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error), [all …]
|
/kernel/linux/linux-5.10/fs/affs/ |
D | namei.c | 402 affs_rename(struct inode *old_dir, struct dentry *old_dentry, in affs_rename() argument 405 struct super_block *sb = old_dir->i_sb; in affs_rename() 428 affs_lock_dir(old_dir); in affs_rename() 429 retval = affs_remove_hash(old_dir, bh); in affs_rename() 430 affs_unlock_dir(old_dir); in affs_rename() 443 mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir); in affs_rename() 449 affs_xrename(struct inode *old_dir, struct dentry *old_dentry, in affs_xrename() argument 453 struct super_block *sb = old_dir->i_sb; in affs_xrename() 469 affs_lock_dir(old_dir); in affs_xrename() 470 retval = affs_remove_hash(old_dir, bh_old); in affs_xrename() [all …]
|
/kernel/linux/linux-5.10/fs/fat/ |
D | namei_msdos.c | 427 static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, in do_msdos_rename() argument 444 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename() 451 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename() 472 if (IS_DIRSYNC(old_dir)) { in do_msdos_rename() 481 inode_inc_iversion(old_dir); in do_msdos_rename() 482 fat_truncate_time(old_dir, NULL, S_CTIME|S_MTIME); in do_msdos_rename() 483 if (IS_DIRSYNC(old_dir)) in do_msdos_rename() 484 (void)fat_sync_inode(old_dir); in do_msdos_rename() 486 mark_inode_dirty(old_dir); in do_msdos_rename() 532 drop_nlink(old_dir); in do_msdos_rename() [all …]
|
D | namei_vfat.c | 895 static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename() argument 906 struct super_block *sb = old_dir->i_sb; in vfat_rename() 915 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename() 920 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename() 928 ts = current_time(old_dir); in vfat_rename() 963 drop_nlink(old_dir); in vfat_rename() 968 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in vfat_rename() 972 inode_inc_iversion(old_dir); in vfat_rename() 973 fat_truncate_time(old_dir, &ts, S_CTIME|S_MTIME); in vfat_rename() 974 if (IS_DIRSYNC(old_dir)) in vfat_rename() [all …]
|
/kernel/linux/linux-5.10/fs/ubifs/ |
D | dir.c | 1283 static int do_rename(struct inode *old_dir, struct dentry *old_dentry, in do_rename() argument 1287 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in do_rename() 1293 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename() 1316 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename() 1335 err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &old_nm); in do_rename() 1376 whiteout = create_whiteout(old_dir, old_dentry); in do_rename() 1411 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename() 1417 time = current_time(old_dir); in do_rename() 1427 drop_nlink(old_dir); in do_rename() 1441 drop_nlink(old_dir); in do_rename() [all …]
|
/kernel/linux/linux-5.10/fs/f2fs/ |
D | namei.c | 913 static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, in f2fs_rename() argument 917 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); in f2fs_rename() 946 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 947 err = f2fs_try_convert_inline_dir(old_dir, new_dentry); in f2fs_rename() 953 err = f2fs_create_whiteout(old_dir, &whiteout); in f2fs_rename() 958 err = dquot_initialize(old_dir); in f2fs_rename() 981 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename() 1060 f2fs_delete_entry(old_entry, old_page, old_dir, NULL); in f2fs_rename() 1077 if (old_dir != new_dir) in f2fs_rename() 1082 f2fs_i_links_write(old_dir, false); in f2fs_rename() [all …]
|
/kernel/linux/linux-5.10/fs/reiserfs/ |
D | namei.c | 1311 static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, in reiserfs_rename() argument 1343 4 * REISERFS_QUOTA_TRANS_BLOCKS(old_dir->i_sb); in reiserfs_rename() 1345 retval = dquot_initialize(old_dir); in reiserfs_rename() 1360 reiserfs_write_lock(old_dir->i_sb); in reiserfs_rename() 1362 reiserfs_find_entry(old_dir, old_dentry->d_name.name, in reiserfs_rename() 1367 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1372 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1385 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1400 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1405 if (dot_dot_de.de_objectid != old_dir->i_ino) { in reiserfs_rename() [all …]
|
/kernel/linux/linux-5.10/fs/jfs/ |
D | namei.c | 1061 static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, in jfs_rename() argument 1087 rc = dquot_initialize(old_dir); in jfs_rename() 1106 rc = dtSearch(old_dir, &old_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename() 1157 if (old_dir != new_dir) in jfs_rename() 1158 mutex_lock_nested(&JFS_IP(old_dir)->commit_mutex, in jfs_rename() 1177 if (old_dir != new_dir) in jfs_rename() 1178 mutex_unlock(&JFS_IP(old_dir)->commit_mutex); in jfs_rename() 1232 rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); in jfs_rename() 1240 drop_nlink(old_dir); in jfs_rename() 1241 if (old_dir != new_dir) { in jfs_rename() [all …]
|
/kernel/linux/linux-5.10/fs/bfs/ |
D | dir.c | 202 static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry, in bfs_rename() argument 223 old_bh = bfs_find_entry(old_dir, &old_dentry->d_name, &old_de); in bfs_rename() 243 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in bfs_rename() 244 mark_inode_dirty(old_dir); in bfs_rename() 249 mark_buffer_dirty_inode(old_bh, old_dir); in bfs_rename()
|
/kernel/linux/linux-5.10/fs/crypto/ |
D | hooks.c | 72 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument 78 err = fscrypt_require_key(old_dir); in __fscrypt_prepare_rename() 91 if (old_dir != new_dir) { in __fscrypt_prepare_rename() 98 IS_ENCRYPTED(old_dir) && in __fscrypt_prepare_rename() 99 !fscrypt_has_permitted_context(old_dir, in __fscrypt_prepare_rename()
|
/kernel/linux/linux-5.10/fs/hpfs/ |
D | namei.c | 510 static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, in hpfs_rename() argument 545 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename() 555 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) { in hpfs_rename() 572 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 577 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 581 if (new_dir == old_dir) in hpfs_rename() 582 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename() 588 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 0))) { in hpfs_rename() 598 drop_nlink(old_dir); in hpfs_rename() 610 hpfs_update_directory_times(old_dir); in hpfs_rename()
|
/kernel/linux/linux-5.10/fs/ocfs2/ |
D | namei.c | 683 struct inode *old_dir = d_inode(old_dentry->d_parent); in ocfs2_link() local 707 err = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_link() 733 err = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_link() 826 ocfs2_double_unlock(old_dir, dir); in ocfs2_link() 1196 static int ocfs2_rename(struct inode *old_dir, in ocfs2_rename() argument 1216 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename() 1231 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename() 1235 status = dquot_initialize(old_dir); in ocfs2_rename() 1246 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename() 1264 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename() [all …]
|
D | dcache.c | 443 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument 446 struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); in ocfs2_dentry_move() 455 if (old_dir == new_dir) in ocfs2_dentry_move()
|
/kernel/linux/linux-5.10/fs/debugfs/ |
D | inode.c | 777 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument 784 if (IS_ERR(old_dir)) in debugfs_rename() 785 return old_dir; in debugfs_rename() 791 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 793 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 806 error = simple_rename(d_inode(old_dir), old_dentry, d_inode(new_dir), in debugfs_rename() 813 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 817 unlock_rename(new_dir, old_dir); in debugfs_rename() 823 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/kernel/linux/linux-5.10/fs/ufs/ |
D | namei.c | 243 static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, in ufs_rename() argument 258 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); in ufs_rename() 300 ufs_delete_entry(old_dir, old_de, old_page); in ufs_rename() 304 if (old_dir != new_dir) in ufs_rename() 310 inode_dec_link_count(old_dir); in ufs_rename()
|
/kernel/linux/linux-5.10/fs/nilfs2/ |
D | namei.c | 341 static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, in nilfs_rename() argument 357 err = nilfs_transaction_begin(old_dir->i_sb, &ti, 1); in nilfs_rename() 362 old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_page); in nilfs_rename() 412 drop_nlink(old_dir); in nilfs_rename() 414 nilfs_mark_inode_dirty(old_dir); in nilfs_rename() 417 err = nilfs_transaction_commit(old_dir->i_sb); in nilfs_rename() 429 nilfs_transaction_abort(old_dir->i_sb); in nilfs_rename()
|
/kernel/linux/linux-5.10/fs/ext2/ |
D | namei.c | 318 static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument 333 err = dquot_initialize(old_dir); in ext2_rename() 341 old_de = ext2_find_entry(old_dir, &old_dentry->d_name, &old_page); in ext2_rename() 390 if (old_dir != new_dir) in ext2_rename() 396 inode_dec_link_count(old_dir); in ext2_rename()
|
/kernel/linux/linux-5.10/fs/coda/ |
D | dir.c | 294 static int coda_rename(struct inode *old_dir, struct dentry *old_dentry, in coda_rename() argument 307 error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), in coda_rename() 313 coda_dir_drop_nlink(old_dir); in coda_rename() 316 coda_dir_update_mtime(old_dir); in coda_rename() 320 coda_flag_inode(old_dir, C_VATTR); in coda_rename()
|
/kernel/linux/linux-5.10/fs/hmdfs/ |
D | hmdfs_merge_view.h | 64 struct inode *old_dir; member 131 int hmdfs_rename_merge(struct inode *old_dir, struct dentry *old_dentry, 134 int do_rename_merge(struct inode *old_dir, struct dentry *old_dentry,
|
D | inode_cloud_merge.c | 653 ret = do_rename_merge(rename_para->old_dir, rename_para->old_dentry, in rename_lo_d_cloud_child() 663 static int hmdfs_rename_cloud_merge(struct inode *old_dir, in hmdfs_rename_cloud_merge() argument 670 struct hmdfs_rename_para rename_para = { old_dir, old_dentry, new_dir, in hmdfs_rename_cloud_merge() 680 if (hmdfs_i(old_dir)->inode_type != hmdfs_i(new_dir)->inode_type) { in hmdfs_rename_cloud_merge() 696 trace_hmdfs_rename_merge(old_dir, old_dentry, new_dir, new_dentry, in hmdfs_rename_cloud_merge() 704 hmdfs_update_meta(old_dir); in hmdfs_rename_cloud_merge() 705 if (old_dir != new_dir) in hmdfs_rename_cloud_merge()
|
/kernel/linux/linux-5.10/include/linux/ |
D | fsnotify.h | 129 static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, in fsnotify_move() argument 140 if (old_dir == new_dir) in fsnotify_move() 148 fsnotify_name(old_dir, old_dir_mask, source, old_name, fs_cookie); in fsnotify_move()
|
D | fscrypt.h | 240 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, 525 static inline int __fscrypt_prepare_rename(struct inode *old_dir, in __fscrypt_prepare_rename() argument 761 static inline int fscrypt_prepare_rename(struct inode *old_dir, in fscrypt_prepare_rename() argument 767 if (IS_ENCRYPTED(old_dir) || IS_ENCRYPTED(new_dir)) in fscrypt_prepare_rename() 768 return __fscrypt_prepare_rename(old_dir, old_dentry, in fscrypt_prepare_rename()
|
/kernel/linux/linux-5.10/fs/exfat/ |
D | namei.c | 1321 static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry, in exfat_rename() argument 1326 struct super_block *sb = old_dir->i_sb; in exfat_rename() 1342 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename() 1364 if (S_ISDIR(old_inode->i_mode) && old_dir != new_dir) { in exfat_rename() 1365 drop_nlink(old_dir); in exfat_rename() 1370 inode_inc_iversion(old_dir); in exfat_rename() 1371 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in exfat_rename() 1372 if (IS_DIRSYNC(old_dir)) in exfat_rename() 1373 exfat_sync_inode(old_dir); in exfat_rename() 1375 mark_inode_dirty(old_dir); in exfat_rename()
|
/kernel/linux/linux-5.10/fs/sharefs/ |
D | inode.c | 255 static int sharefs_rename(struct inode *old_dir, struct dentry *old_dentry, in sharefs_rename() argument 296 if (new_dir != old_dir) { in sharefs_rename() 297 fsstack_copy_attr_all(old_dir, in sharefs_rename() 299 fsstack_copy_inode_size(old_dir, in sharefs_rename()
|