/linux/fs/nfs/ |
H A D | unlink.c | 269 struct inode *new_dir = data->new_dir; in nfs_async_rename_done() local 273 new_dir, data->new_dentry, task->tk_status); in nfs_async_rename_done() 301 if (data->new_dir != data->old_dir) { in nfs_async_rename_release() 302 spin_lock(&data->new_dir->i_lock); in nfs_async_rename_release() 303 nfs_force_lookup_revalidate(data->new_dir); in nfs_async_rename_release() 304 spin_unlock(&data->new_dir->i_lock); in nfs_async_rename_release() 311 iput(data->new_dir); in nfs_async_rename_release() 355 nfs_server_capable(new_dir, NFS_CAP_MOVEABLE)) in nfs_async_rename() 373 data->new_dir = new_dir; in nfs_async_rename() 374 ihold(new_dir); in nfs_async_rename() [all …]
|
H A D | nfstrace.h | 804 const struct inode *new_dir, 813 __field(u64, new_dir) 821 __entry->new_dir = NFS_FILEID(new_dir); 832 (unsigned long long)__entry->new_dir, 841 const struct inode *new_dir, \ 850 const struct inode *new_dir, 862 __field(u64, new_dir) 870 __entry->new_dir = NFS_FILEID(new_dir); 883 (unsigned long long)__entry->new_dir, 892 const struct inode *new_dir, \ [all …]
|
/linux/fs/f2fs/ |
H A D | namei.c | 907 (!projid_eq(F2FS_I(new_dir)->i_projid, in f2fs_rename() 919 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 942 err = f2fs_dquot_initialize(new_dir); in f2fs_rename() 960 if (old_is_dir && old_dir != new_dir) { in f2fs_rename() 1018 f2fs_i_links_write(new_dir, true); in f2fs_rename() 1100 !projid_eq(F2FS_I(new_dir)->i_projid, in f2fs_cross_rename() 1111 err = f2fs_dquot_initialize(new_dir); in f2fs_cross_rename() 1131 if (old_dir != new_dir) { in f2fs_cross_rename() 1210 inode_set_ctime_current(new_dir); in f2fs_cross_rename() 1266 new_dir, new_dentry); in f2fs_rename2() [all …]
|
/linux/fs/affs/ |
H A D | namei.c | 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() 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() 489 retval = affs_insert_hash(new_dir, bh_old); in affs_xrename() 490 affs_unlock_dir(new_dir); in affs_xrename() 499 mark_buffer_dirty_inode(bh_old, new_dir); in affs_xrename() [all …]
|
/linux/fs/fat/ |
H A D | namei_vfat.c | 951 if (old_dir != new_dir) { in vfat_rename() 974 inode_inc_iversion(new_dir); in vfat_rename() 989 inc_nlink(new_dir); in vfat_rename() 1038 fat_fs_error(new_dir->i_sb, in vfat_rename() 1078 if (old_dir != new_dir) { in vfat_rename_exchange() 1119 vfat_move_nlink(old_dir, new_dir); in vfat_rename_exchange() 1121 vfat_move_nlink(new_dir, old_dir); in vfat_rename_exchange() 1126 if (old_dir != new_dir) in vfat_rename_exchange() 1127 vfat_update_dir_metadata(new_dir, &ts); in vfat_rename_exchange() 1154 fat_fs_error(new_dir->i_sb, in vfat_rename_exchange() [all …]
|
H A D | namei_msdos.c | 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() 510 inode_inc_iversion(new_dir); in do_msdos_rename() 518 if (IS_DIRSYNC(new_dir)) { 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() 589 fat_fs_error(new_dir->i_sb, in do_msdos_rename() 599 struct inode *new_dir, struct dentry *new_dentry, in msdos_rename() argument 618 &MSDOS_SB(new_dir->i_sb)->options); in msdos_rename() [all …]
|
/linux/fs/ubifs/ |
H A D | dir.c | 1354 new_dentry, new_dir->i_ino, flags); in do_rename() 1465 inc_nlink(new_dir); in do_rename() 1496 new_dir->i_size += new_sz; in do_rename() 1497 ubifs_inode(new_dir)->ui_size = new_dir->i_size; in do_rename() 1552 new_dir->i_size -= new_sz; in do_rename() 1553 ubifs_inode(new_dir)->ui_size = new_dir->i_size; in do_rename() 1561 drop_nlink(new_dir); in do_rename() 1622 if (old_dir != new_dir) { in ubifs_xrename() 1624 inc_nlink(new_dir); in ubifs_xrename() 1628 drop_nlink(new_dir); in ubifs_xrename() [all …]
|
/linux/fs/jfs/ |
H A D | namei.c | 1097 rc = dquot_initialize(new_dir); in jfs_rename() 1164 if (old_dir != new_dir) in jfs_rename() 1184 if (old_dir != new_dir) in jfs_rename() 1232 inc_nlink(new_dir); in jfs_rename() 1248 if (old_dir != new_dir) { in jfs_rename() 1254 cpu_to_le32(new_dir->i_ino); in jfs_rename() 1275 inode_set_mtime_to_ts(new_dir, inode_set_ctime_current(new_dir)); in jfs_rename() 1276 mark_inode_dirty(new_dir); in jfs_rename() 1285 if (old_dir != new_dir) { in jfs_rename() 1286 iplist[ipcount++] = new_dir; in jfs_rename() [all …]
|
/linux/fs/ext2/ |
H A D | namei.c | 319 struct inode * new_dir, struct dentry * new_dentry, in ext2_rename() argument 338 err = dquot_initialize(new_dir); in ext2_rename() 346 if (old_is_dir && old_dir != new_dir) { in ext2_rename() 361 new_de = ext2_find_entry(new_dir, &new_dentry->d_name, in ext2_rename() 367 err = ext2_set_link(new_dir, new_de, new_folio, old_inode, true); in ext2_rename() 380 inode_inc_link_count(new_dir); in ext2_rename() 392 if (old_dir != new_dir) in ext2_rename() 394 new_dir, false); in ext2_rename()
|
/linux/fs/ufs/ |
H A 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_folio); in ufs_rename() 284 ufs_set_link(new_dir, new_de, new_folio, 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_folio, new_dir, 0); in ufs_rename()
|
/linux/fs/ntfs3/ |
H A D | namei.c | 235 struct dentry *dentry, struct inode *new_dir, in ntfs_rename() argument 242 struct ntfs_inode *new_dir_ni = ntfs_i(new_dir); in ntfs_rename() 269 if (is_same && dir == new_dir) { in ntfs_rename() 283 err = ntfs_unlink_inode(new_dir, new_dentry); in ntfs_rename() 322 simple_rename_timestamp(dir, dentry, new_dir, new_dentry); in ntfs_rename() 325 if (dir != new_dir) in ntfs_rename() 326 mark_inode_dirty(new_dir); in ntfs_rename() 331 if (IS_DIRSYNC(new_dir)) in ntfs_rename()
|
/linux/fs/debugfs/ |
H A D | inode.c | 870 struct dentry *new_dir, const char *new_name) in debugfs_rename() argument 878 if (IS_ERR(new_dir)) in debugfs_rename() 879 return new_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() 891 dentry = lookup_one_len(new_name, new_dir, strlen(new_name)); in debugfs_rename() 899 d_inode(new_dir), dentry, 0); 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/fs/hpfs/ |
H A D | namei.c | 498 struct dentry *old_dentry, struct inode *new_dir, in hpfs_rename() argument 543 if ((nde = map_dirent(new_dir, hpfs_i(new_dir)->i_dno, new_name, new_len, NULL, &qbh1))) { in hpfs_rename() 551 hpfs_error(new_dir->i_sb, "hpfs_rename: could not find dirent"); in hpfs_rename() 559 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 561 if ((r = hpfs_add_dirent(new_dir, new_name, new_len, &de))) { in hpfs_rename() 564 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 568 if (new_dir == old_dir) in hpfs_rename() 582 hpfs_i(i)->i_parent_dir = new_dir->i_ino; in hpfs_rename() 584 inc_nlink(new_dir); in hpfs_rename() 588 fnode->up = cpu_to_le32(new_dir->i_ino); in hpfs_rename() [all …]
|
/linux/fs/ |
H A D | libfs.c | 375 struct inode *new_dir, struct dentry *new_dentry) in simple_offset_rename() argument 378 struct offset_ctx *new_ctx = new_dir->i_op->get_offset_ctx(new_dir); in simple_offset_rename() 405 struct inode *new_dir, in simple_offset_rename_exchange() argument 409 struct offset_ctx *new_ctx = new_dir->i_op->get_offset_ctx(new_dir); in simple_offset_rename_exchange() 813 if (new_dir != old_dir) in simple_rename_timestamp() 814 inode_set_mtime_to_ts(new_dir, in simple_rename_timestamp() 815 inode_set_ctime_current(new_dir)); in simple_rename_timestamp() 831 inc_nlink(new_dir); in simple_rename_exchange() 833 drop_nlink(new_dir); in simple_rename_exchange() 858 simple_unlink(new_dir, new_dentry); in simple_rename() [all …]
|
/linux/fs/exfat/ |
H A D | namei.c | 1247 struct inode *new_dir, struct dentry *new_dentry, in exfat_rename() argument 1254 loff_t size = i_size_read(new_dir); in exfat_rename() 1272 inode_inc_iversion(new_dir); in exfat_rename() 1274 EXFAT_I(new_dir)->i_crtime = current_time(new_dir); in exfat_rename() 1275 exfat_truncate_inode_atime(new_dir); in exfat_rename() 1276 if (IS_DIRSYNC(new_dir) && size != i_size_read(new_dir)) in exfat_rename() 1277 exfat_sync_inode(new_dir); in exfat_rename() 1279 mark_inode_dirty(new_dir); in exfat_rename() 1285 if (IS_DIRSYNC(new_dir)) in exfat_rename() 1293 inc_nlink(new_dir); in exfat_rename() [all …]
|
/linux/fs/nilfs2/ |
H A D | namei.c | 358 struct inode *new_dir, struct dentry *new_dentry, in nilfs_rename() argument 398 new_de = nilfs_find_entry(new_dir, &new_dentry->d_name, in nilfs_rename() 404 nilfs_set_link(new_dir, new_de, new_folio, old_inode); in nilfs_rename() 406 nilfs_mark_inode_dirty(new_dir); in nilfs_rename() 417 inc_nlink(new_dir); in nilfs_rename() 418 nilfs_mark_inode_dirty(new_dir); in nilfs_rename() 431 nilfs_set_link(old_inode, dir_de, dir_folio, new_dir); in nilfs_rename()
|
/linux/fs/ocfs2/ |
H A D | namei.c | 1203 struct inode *new_dir, in ocfs2_rename() argument 1245 status = dquot_initialize(new_dir); in ocfs2_rename() 1295 &new_dir_bh, new_dir, 1); in ocfs2_rename() 1302 if (!new_dir->i_nlink) { in ocfs2_rename() 1387 &newfe_blkno, new_dir, in ocfs2_rename() 1518 inode_inc_iversion(new_dir); in ocfs2_rename() 1612 inc_nlink(new_dir); in ocfs2_rename() 1613 mark_inode_dirty(new_dir); in ocfs2_rename() 1623 if (old_dir != new_dir) { in ocfs2_rename() 1625 inode_set_mtime_to_ts(new_dir, in ocfs2_rename() [all …]
|
H A D | dcache.c | 434 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument 446 if (old_dir == new_dir) in ocfs2_dentry_move() 452 ret = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(new_dir)->ip_blkno); in ocfs2_dentry_move()
|
/linux/fs/crypto/ |
H A D | hooks.c | 90 struct inode *new_dir, struct dentry *new_dentry, in __fscrypt_prepare_rename() argument 101 if (old_dir != new_dir) { in __fscrypt_prepare_rename() 102 if (IS_ENCRYPTED(new_dir) && in __fscrypt_prepare_rename() 103 !fscrypt_has_permitted_context(new_dir, in __fscrypt_prepare_rename()
|
/linux/fs/hfs/ |
H A 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/security/landlock/ |
H A D | fs.c | 1105 const struct path *const new_dir, in current_check_refer_path() argument 1139 if (old_dentry->d_parent == new_dir->dentry) { in current_check_refer_path() 1148 dom, new_dir, access_request_parent1, in current_check_refer_path() 1158 mnt_dir.mnt = new_dir->mnt; in current_check_refer_path() 1159 mnt_dir.dentry = new_dir->mnt->mnt_root; in current_check_refer_path() 1174 dom, mnt_dir.dentry, new_dir->dentry, &layer_masks_parent2); in current_check_refer_path() 1405 const struct path *const new_dir, in hook_path_link() argument 1408 return current_check_refer_path(old_dentry, new_dir, new_dentry, false, in hook_path_link() 1414 const struct path *const new_dir, in hook_path_rename() argument 1419 return current_check_refer_path(old_dentry, new_dir, new_dentry, true, in hook_path_rename()
|
/linux/fs/sysv/ |
H A 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_folio, new_dir); in sysv_rename()
|
/linux/fs/reiserfs/ |
H A D | namei.c | 1308 struct inode *new_dir, struct dentry *new_dentry, in reiserfs_rename() argument 1343 retval = dquot_initialize(new_dir); in reiserfs_rename() 1384 if (old_dir != new_dir) { in reiserfs_rename() 1417 reiserfs_add_entry(&th, new_dir, new_dentry->d_name.name, in reiserfs_rename() 1431 reiserfs_update_inode_transaction(new_dir); in reiserfs_rename() 1448 search_by_entry_key(new_dir->i_sb, &old_de.de_entry_key, in reiserfs_rename() 1464 reiserfs_find_entry(new_dir, new_dentry->d_name.name, in reiserfs_rename() 1487 search_by_entry_key(new_dir->i_sb, in reiserfs_rename() 1593 set_ino_in_dir_entry(&dot_dot_de, INODE_PKEY(new_dir)); in reiserfs_rename() 1602 INC_DIR_INODE_NLINK(new_dir); in reiserfs_rename() [all …]
|
/linux/fs/udf/ |
H A D | namei.c | 762 struct dentry *old_dentry, struct inode *new_dir, in udf_rename() argument 793 if (is_dir && old_dir != new_dir) { in udf_rename() 817 retval = udf_fiiter_find_entry(new_dir, &new_dentry->d_name, &niter); in udf_rename() 829 retval = udf_fiiter_add_entry(new_dir, new_dentry, &niter); in udf_rename() 872 inode_set_mtime_to_ts(new_dir, inode_set_ctime_current(new_dir)); in udf_rename() 874 mark_inode_dirty(new_dir); in udf_rename() 878 cpu_to_lelb(UDF_I(new_dir)->i_location); in udf_rename() 888 inc_nlink(new_dir); in udf_rename() 889 mark_inode_dirty(new_dir); in udf_rename()
|
/linux/fs/minix/ |
H A D | namei.c | 178 struct inode *new_dir, struct dentry *new_dentry, in minix_rename() argument 228 inode_inc_link_count(new_dir); in minix_rename() 238 err = minix_set_link(dir_de, dir_folio, new_dir); in minix_rename()
|