/linux-6.12.1/fs/nfs/ |
D | unlink.c | 268 struct inode *old_dir = data->old_dir; in nfs_async_rename_done() local 272 trace_nfs_async_rename_done(old_dir, old_dentry, in nfs_async_rename_done() 274 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done() 290 struct super_block *sb = data->old_dir->i_sb; in nfs_async_rename_release() 298 spin_lock(&data->old_dir->i_lock); in nfs_async_rename_release() 299 nfs_force_lookup_revalidate(data->old_dir); in nfs_async_rename_release() 300 spin_unlock(&data->old_dir->i_lock); in nfs_async_rename_release() 301 if (data->new_dir != data->old_dir) { in nfs_async_rename_release() 310 iput(data->old_dir); in nfs_async_rename_release() 320 NFS_PROTO(data->old_dir)->rename_rpc_prepare(task, data); in nfs_rename_prepare() [all …]
|
D | nfstrace.h | 802 const struct inode *old_dir, 808 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry), 812 __field(u64, old_dir) 819 __entry->dev = old_dir->i_sb->s_dev; 820 __entry->old_dir = NFS_FILEID(old_dir); 829 (unsigned long long)__entry->old_dir, 839 const struct inode *old_dir, \ 844 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry)) 848 const struct inode *old_dir, 855 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error), [all …]
|
/linux-6.12.1/fs/fat/ |
D | namei_msdos.c | 428 static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, in do_msdos_rename() argument 445 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename() 452 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename() 473 if (IS_DIRSYNC(old_dir)) { in do_msdos_rename() 482 inode_inc_iversion(old_dir); in do_msdos_rename() 483 fat_truncate_time(old_dir, NULL, S_CTIME|S_MTIME); in do_msdos_rename() 484 if (IS_DIRSYNC(old_dir)) in do_msdos_rename() 485 (void)fat_sync_inode(old_dir); in do_msdos_rename() 487 mark_inode_dirty(old_dir); in do_msdos_rename() 533 drop_nlink(old_dir); in do_msdos_rename() [all …]
|
D | namei_vfat.c | 931 static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename() argument 941 struct super_block *sb = old_dir->i_sb; in vfat_rename() 947 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename() 951 if (old_dir != new_dir) { in vfat_rename() 958 ts = current_time(old_dir); in vfat_rename() 987 drop_nlink(old_dir); in vfat_rename() 992 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in vfat_rename() 996 vfat_update_dir_metadata(old_dir, &ts); in vfat_rename() 1017 corrupt |= vfat_update_dotdot_de(old_dir, old_inode, dotdot_bh, in vfat_rename() 1060 static int vfat_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename_exchange() argument [all …]
|
/linux-6.12.1/fs/affs/ |
D | namei.c | 405 affs_rename(struct inode *old_dir, struct dentry *old_dentry, in affs_rename() argument 408 struct super_block *sb = old_dir->i_sb; in affs_rename() 431 affs_lock_dir(old_dir); in affs_rename() 432 retval = affs_remove_hash(old_dir, bh); in affs_rename() 433 affs_unlock_dir(old_dir); in affs_rename() 446 mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir); in affs_rename() 452 affs_xrename(struct inode *old_dir, struct dentry *old_dentry, in affs_xrename() argument 456 struct super_block *sb = old_dir->i_sb; in affs_xrename() 472 affs_lock_dir(old_dir); in affs_xrename() 473 retval = affs_remove_hash(old_dir, bh_old); in affs_xrename() [all …]
|
/linux-6.12.1/fs/f2fs/ |
D | namei.c | 885 static int f2fs_rename(struct mnt_idmap *idmap, struct inode *old_dir, in f2fs_rename() argument 889 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); in f2fs_rename() 919 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 920 err = f2fs_try_convert_inline_dir(old_dir, new_dentry); in f2fs_rename() 928 err = f2fs_setup_filename(old_dir, &old_dentry->d_name, in f2fs_rename() 933 err = f2fs_create_whiteout(idmap, old_dir, &whiteout, &fname); in f2fs_rename() 938 err = f2fs_dquot_initialize(old_dir); in f2fs_rename() 953 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename() 960 if (old_is_dir && old_dir != new_dir) { in f2fs_rename() 1032 f2fs_delete_entry(old_entry, old_page, old_dir, NULL); in f2fs_rename() [all …]
|
/linux-6.12.1/fs/ubifs/ |
D | dir.c | 1321 static int do_rename(struct inode *old_dir, struct dentry *old_dentry, in do_rename() argument 1325 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in do_rename() 1331 int err, release, sync = 0, move = (new_dir != old_dir); 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() 1444 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename() 1450 simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); in do_rename() 1459 drop_nlink(old_dir); in do_rename() 1473 drop_nlink(old_dir); in do_rename() [all …]
|
/linux-6.12.1/fs/reiserfs/ |
D | namei.c | 1307 struct inode *old_dir, struct dentry *old_dentry, in reiserfs_rename() argument 1338 4 * REISERFS_QUOTA_TRANS_BLOCKS(old_dir->i_sb); in reiserfs_rename() 1340 retval = dquot_initialize(old_dir); in reiserfs_rename() 1355 reiserfs_write_lock(old_dir->i_sb); in reiserfs_rename() 1357 reiserfs_find_entry(old_dir, old_dentry->d_name.name, in reiserfs_rename() 1362 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1367 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1379 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1384 if (old_dir != new_dir) { in reiserfs_rename() 1396 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() [all …]
|
/linux-6.12.1/fs/jfs/ |
D | namei.c | 1068 static int jfs_rename(struct mnt_idmap *idmap, struct inode *old_dir, in jfs_rename() argument 1094 rc = dquot_initialize(old_dir); in jfs_rename() 1113 rc = dtSearch(old_dir, &old_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename() 1164 if (old_dir != new_dir) in jfs_rename() 1165 mutex_lock_nested(&JFS_IP(old_dir)->commit_mutex, in jfs_rename() 1184 if (old_dir != new_dir) in jfs_rename() 1185 mutex_unlock(&JFS_IP(old_dir)->commit_mutex); in jfs_rename() 1239 rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); in jfs_rename() 1247 drop_nlink(old_dir); in jfs_rename() 1248 if (old_dir != new_dir) { in jfs_rename() [all …]
|
/linux-6.12.1/fs/hpfs/ |
D | namei.c | 497 static int hpfs_rename(struct mnt_idmap *idmap, struct inode *old_dir, in hpfs_rename() argument 532 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename() 542 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) { in hpfs_rename() 559 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 564 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 568 if (new_dir == old_dir) in hpfs_rename() 569 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename() 575 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 0))) { in hpfs_rename() 585 drop_nlink(old_dir); in hpfs_rename() 597 hpfs_update_directory_times(old_dir); in hpfs_rename()
|
/linux-6.12.1/fs/debugfs/ |
D | inode.c | 869 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument 876 if (IS_ERR(old_dir)) in debugfs_rename() 877 return old_dir; in debugfs_rename() 883 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 885 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 898 error = simple_rename(&nop_mnt_idmap, d_inode(old_dir), old_dentry, in debugfs_rename() 905 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 909 unlock_rename(new_dir, old_dir); in debugfs_rename() 915 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/linux-6.12.1/fs/ocfs2/ |
D | namei.c | 685 struct inode *old_dir = d_inode(old_dentry->d_parent); in ocfs2_link() local 709 err = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_link() 735 err = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_link() 829 ocfs2_double_unlock(old_dir, dir); in ocfs2_link() 1201 struct inode *old_dir, in ocfs2_rename() argument 1221 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename() 1236 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename() 1240 status = dquot_initialize(old_dir); in ocfs2_rename() 1251 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename() 1269 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename() [all …]
|
D | dcache.c | 434 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument 437 struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); in ocfs2_dentry_move() 446 if (old_dir == new_dir) in ocfs2_dentry_move()
|
D | dcache.h | 38 struct inode *old_dir, struct inode *new_dir);
|
/linux-6.12.1/fs/ |
D | libfs.c | 374 int simple_offset_rename(struct inode *old_dir, struct dentry *old_dentry, in simple_offset_rename() argument 377 struct offset_ctx *old_ctx = old_dir->i_op->get_offset_ctx(old_dir); in simple_offset_rename() 403 int simple_offset_rename_exchange(struct inode *old_dir, in simple_offset_rename_exchange() argument 408 struct offset_ctx *old_ctx = old_dir->i_op->get_offset_ctx(old_dir); in simple_offset_rename_exchange() 427 ret = simple_rename_exchange(old_dir, old_dentry, new_dir, new_dentry); in simple_offset_rename_exchange() 807 void simple_rename_timestamp(struct inode *old_dir, struct dentry *old_dentry, in simple_rename_timestamp() argument 812 inode_set_mtime_to_ts(old_dir, inode_set_ctime_current(old_dir)); in simple_rename_timestamp() 813 if (new_dir != old_dir) in simple_rename_timestamp() 822 int simple_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, in simple_rename_exchange() argument 828 if (old_dir != new_dir && old_is_dir != new_is_dir) { in simple_rename_exchange() [all …]
|
/linux-6.12.1/fs/ufs/ |
D | namei.c | 246 static int ufs_rename(struct mnt_idmap *idmap, struct inode *old_dir, in ufs_rename() argument 261 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_folio); in ufs_rename() 303 ufs_delete_entry(old_dir, old_de, old_folio); in ufs_rename() 307 if (old_dir != new_dir) in ufs_rename() 311 inode_dec_link_count(old_dir); in ufs_rename()
|
/linux-6.12.1/fs/bfs/ |
D | dir.c | 202 static int bfs_rename(struct mnt_idmap *idmap, struct inode *old_dir, in bfs_rename() argument 223 old_bh = bfs_find_entry(old_dir, &old_dentry->d_name, &old_de); in bfs_rename() 243 inode_set_mtime_to_ts(old_dir, inode_set_ctime_current(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()
|
/linux-6.12.1/fs/ext2/ |
D | namei.c | 318 struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument 334 err = dquot_initialize(old_dir); in ext2_rename() 342 old_de = ext2_find_entry(old_dir, &old_dentry->d_name, &old_folio); in ext2_rename() 346 if (old_is_dir && old_dir != new_dir) { in ext2_rename() 392 if (old_dir != new_dir) in ext2_rename() 396 inode_dec_link_count(old_dir); in ext2_rename()
|
/linux-6.12.1/fs/udf/ |
D | namei.c | 761 static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir, in udf_rename() argument 775 retval = udf_fiiter_find_entry(old_dir, &old_dentry->d_name, &oiter); in udf_rename() 780 if (udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) != old_inode->i_ino) { in udf_rename() 793 if (is_dir && old_dir != new_dir) { in udf_rename() 807 old_dir->i_ino) { in udf_rename() 811 old_inode->i_ino, old_dir->i_ino, in udf_rename() 855 retval = udf_fiiter_find_entry(old_dir, &old_dentry->d_name, &oiter); in udf_rename() 857 udf_err(old_dir->i_sb, in udf_rename() 859 old_dir->i_ino); in udf_rename() 868 udf_add_fid_counter(old_dir->i_sb, S_ISDIR(new_inode->i_mode), in udf_rename() [all …]
|
/linux-6.12.1/fs/nilfs2/ |
D | namei.c | 357 struct inode *old_dir, struct dentry *old_dentry, in nilfs_rename() argument 373 err = nilfs_transaction_begin(old_dir->i_sb, &ti, 1); in nilfs_rename() 377 old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_folio); in nilfs_rename() 433 drop_nlink(old_dir); in nilfs_rename() 437 nilfs_mark_inode_dirty(old_dir); in nilfs_rename() 440 err = nilfs_transaction_commit(old_dir->i_sb); in nilfs_rename() 449 nilfs_transaction_abort(old_dir->i_sb); in nilfs_rename()
|
/linux-6.12.1/fs/crypto/ |
D | hooks.c | 89 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument 101 if (old_dir != new_dir) { in __fscrypt_prepare_rename() 108 IS_ENCRYPTED(old_dir) && in __fscrypt_prepare_rename() 109 !fscrypt_has_permitted_context(old_dir, in __fscrypt_prepare_rename()
|
/linux-6.12.1/fs/coda/ |
D | dir.c | 298 static int coda_rename(struct mnt_idmap *idmap, struct inode *old_dir, in coda_rename() argument 311 error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), in coda_rename() 317 coda_dir_drop_nlink(old_dir); in coda_rename() 322 coda_dir_update_mtime(old_dir); in coda_rename()
|
/linux-6.12.1/fs/hfs/ |
D | dir.c | 283 static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir, in hfs_rename() argument 300 old_dir, &old_dentry->d_name, in hfs_rename() 303 hfs_cat_build_key(old_dir->i_sb, in hfs_rename()
|
/linux-6.12.1/include/linux/ |
D | fsnotify.h | 209 static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, in fsnotify_move() argument 229 old_dir, old_name, 0); in fsnotify_move() 232 old_dir, old_name, fs_cookie); in fsnotify_move()
|
D | fscrypt.h | 426 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, 747 static inline int __fscrypt_prepare_rename(struct inode *old_dir, in __fscrypt_prepare_rename() argument 988 static inline int fscrypt_prepare_rename(struct inode *old_dir, in fscrypt_prepare_rename() argument 994 if (IS_ENCRYPTED(old_dir) || IS_ENCRYPTED(new_dir)) in fscrypt_prepare_rename() 995 return __fscrypt_prepare_rename(old_dir, old_dentry, in fscrypt_prepare_rename()
|