/linux/fs/f2fs/ |
A D | namei.c | 956 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 972 err = f2fs_dquot_initialize(new_dir); in f2fs_rename() 1048 f2fs_i_links_write(new_dir, true); in f2fs_rename() 1079 if (old_dir != new_dir && !whiteout) in f2fs_rename() 1081 old_dir_page, new_dir); in f2fs_rename() 1145 err = f2fs_dquot_initialize(new_dir); in f2fs_cross_rename() 1165 if (old_dir != new_dir) { in f2fs_cross_rename() 1244 new_dir->i_ctime = current_time(new_dir); in f2fs_cross_rename() 1246 down_write(&F2FS_I(new_dir)->i_sem); in f2fs_cross_rename() 1248 up_write(&F2FS_I(new_dir)->i_sem); in f2fs_cross_rename() [all …]
|
/linux/fs/nfs/ |
A D | unlink.c | 262 struct inode *new_dir = data->new_dir; in nfs_async_rename_done() local 266 new_dir, data->new_dentry, task->tk_status); in nfs_async_rename_done() 294 if (data->new_dir != data->old_dir) { in nfs_async_rename_release() 295 spin_lock(&data->new_dir->i_lock); in nfs_async_rename_release() 296 nfs_force_lookup_revalidate(data->new_dir); in nfs_async_rename_release() 297 spin_unlock(&data->new_dir->i_lock); in nfs_async_rename_release() 304 iput(data->new_dir); in nfs_async_rename_release() 333 nfs_async_rename(struct inode *old_dir, struct inode *new_dir, in nfs_async_rename() argument 361 data->new_dir = new_dir; in nfs_async_rename() 362 ihold(new_dir); in nfs_async_rename() [all …]
|
A D | nfstrace.h | 682 const struct inode *new_dir, 691 __field(u64, new_dir) 699 __entry->new_dir = NFS_FILEID(new_dir); 710 (unsigned long long)__entry->new_dir, 719 const struct inode *new_dir, \ 728 const struct inode *new_dir, 740 __field(u64, new_dir) 748 __entry->new_dir = NFS_FILEID(new_dir); 761 (unsigned long long)__entry->new_dir, 770 const struct inode *new_dir, \ [all …]
|
/linux/fs/affs/ |
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/ubifs/ |
A D | dir.c | 1372 inc_nlink(new_dir); in do_rename() 1387 new_dir->i_mtime = new_dir->i_ctime = time; in do_rename() 1406 new_dir->i_size += new_sz; in do_rename() 1407 ubifs_inode(new_dir)->ui_size = new_dir->i_size; in do_rename() 1470 new_dir->i_size -= new_sz; in do_rename() 1471 ubifs_inode(new_dir)->ui_size = new_dir->i_size; in do_rename() 1479 drop_nlink(new_dir); in do_rename() 1529 new_dir->i_mtime = new_dir->i_ctime = time; in ubifs_xrename() 1531 if (old_dir != new_dir) { in ubifs_xrename() 1533 inc_nlink(new_dir); in ubifs_xrename() [all …]
|
/linux/fs/fat/ |
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 …]
|
A D | namei_vfat.c | 897 struct dentry *old_dentry, struct inode *new_dir, in vfat_rename() argument 921 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename() 939 err = vfat_add_entry(new_dir, &new_dentry->d_name, is_dir, 0, in vfat_rename() 945 inode_inc_iversion(new_dir); in vfat_rename() 949 if (IS_DIRSYNC(new_dir)) { in vfat_rename() 957 fat_set_start(dotdot_de, MSDOS_I(new_dir)->i_logstart); in vfat_rename() 959 if (IS_DIRSYNC(new_dir)) { in vfat_rename() 966 inc_nlink(new_dir); in vfat_rename() 1015 int err2 = fat_remove_entries(new_dir, &sinfo); in vfat_rename() 1021 fat_fs_error(new_dir->i_sb, in vfat_rename()
|
/linux/fs/ntfs3/ |
A D | namei.c | 231 struct dentry *dentry, struct inode *new_dir, in ntfs_rename() argument 238 struct ntfs_inode *new_dir_ni = ntfs_i(new_dir); in ntfs_rename() 262 if (is_same && dir == new_dir) { in ntfs_rename() 276 err = ntfs_unlink_inode(new_dir, new_dentry); in ntfs_rename() 319 if (dir != new_dir) { in ntfs_rename() 320 new_dir->i_mtime = new_dir->i_ctime = dir->i_ctime; in ntfs_rename() 321 mark_inode_dirty(new_dir); in ntfs_rename() 327 if (IS_DIRSYNC(new_dir)) in ntfs_rename()
|
/linux/fs/jfs/ |
A D | namei.c | 1091 rc = dquot_initialize(new_dir); in jfs_rename() 1158 if (old_dir != new_dir) in jfs_rename() 1178 if (old_dir != new_dir) in jfs_rename() 1226 inc_nlink(new_dir); in jfs_rename() 1242 if (old_dir != new_dir) { in jfs_rename() 1248 cpu_to_le32(new_dir->i_ino); in jfs_rename() 1269 new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir); in jfs_rename() 1270 mark_inode_dirty(new_dir); in jfs_rename() 1279 if (old_dir != new_dir) { in jfs_rename() 1280 iplist[ipcount++] = new_dir; in jfs_rename() [all …]
|
/linux/fs/debugfs/ |
A D | inode.c | 757 struct dentry *new_dir, const char *new_name) in debugfs_rename() argument 765 if (IS_ERR(new_dir)) in debugfs_rename() 766 return new_dir; in debugfs_rename() 770 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 772 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 778 dentry = lookup_one_len(new_name, new_dir, strlen(new_name)); in debugfs_rename() 786 d_inode(new_dir), dentry, 0); in debugfs_rename() 792 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 796 unlock_rename(new_dir, old_dir); in debugfs_rename() 802 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/linux/fs/hpfs/ |
A D | namei.c | 515 struct dentry *old_dentry, struct inode *new_dir, in hpfs_rename() argument 560 if ((nde = map_dirent(new_dir, hpfs_i(new_dir)->i_dno, new_name, new_len, NULL, &qbh1))) { in hpfs_rename() 568 hpfs_error(new_dir->i_sb, "hpfs_rename: could not find dirent"); in hpfs_rename() 576 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 578 if ((r = hpfs_add_dirent(new_dir, new_name, new_len, &de))) { in hpfs_rename() 581 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 585 if (new_dir == old_dir) in hpfs_rename() 599 hpfs_i(i)->i_parent_dir = new_dir->i_ino; in hpfs_rename() 601 inc_nlink(new_dir); in hpfs_rename() 605 fnode->up = cpu_to_le32(new_dir->i_ino); in hpfs_rename() [all …]
|
/linux/fs/ufs/ |
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_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/fs/ext2/ |
A D | namei.c | 326 struct inode * new_dir, struct dentry * new_dentry, in ext2_rename() argument 346 err = dquot_initialize(new_dir); in ext2_rename() 373 new_de = ext2_find_entry(new_dir, &new_dentry->d_name, in ext2_rename() 379 ext2_set_link(new_dir, new_de, new_page, page_addr, old_inode, 1); in ext2_rename() 390 inode_inc_link_count(new_dir); in ext2_rename() 403 if (old_dir != new_dir) in ext2_rename() 405 dir_page_addr, new_dir, 0); in ext2_rename()
|
/linux/fs/nilfs2/ |
A 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/fs/exfat/ |
A D | namei.c | 1331 struct inode *new_dir, struct dentry *new_dentry, in exfat_rename() argument 1355 inode_inc_iversion(new_dir); in exfat_rename() 1356 new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime = in exfat_rename() 1357 EXFAT_I(new_dir)->i_crtime = current_time(new_dir); in exfat_rename() 1358 exfat_truncate_atime(&new_dir->i_atime); in exfat_rename() 1359 if (IS_DIRSYNC(new_dir)) in exfat_rename() 1360 exfat_sync_inode(new_dir); in exfat_rename() 1362 mark_inode_dirty(new_dir); in exfat_rename() 1368 if (IS_DIRSYNC(new_dir)) in exfat_rename() 1373 if (S_ISDIR(old_inode->i_mode) && old_dir != new_dir) { in exfat_rename() [all …]
|
/linux/include/linux/ |
A D | fsnotify.h | 138 static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, in fsnotify_move() argument 149 if (old_dir == new_dir) in fsnotify_move() 160 new_dir, new_name, fs_cookie); in fsnotify_move() 165 audit_inode_child(new_dir, moved, AUDIT_TYPE_CHILD_CREATE); in fsnotify_move()
|
A D | fscrypt.h | 338 struct inode *new_dir, struct dentry *new_dentry, 622 struct inode *new_dir, in __fscrypt_prepare_rename() argument 842 struct inode *new_dir, in fscrypt_prepare_rename() argument 846 if (IS_ENCRYPTED(old_dir) || IS_ENCRYPTED(new_dir)) in fscrypt_prepare_rename() 848 new_dir, new_dentry, flags); in fscrypt_prepare_rename()
|
/linux/fs/ocfs2/ |
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() 1388 &newfe_blkno, new_dir, in ocfs2_rename() 1519 inode_inc_iversion(new_dir); in ocfs2_rename() 1602 inc_nlink(new_dir); in ocfs2_rename() 1603 mark_inode_dirty(new_dir); in ocfs2_rename() 1613 if (old_dir != new_dir) { in ocfs2_rename() 1615 new_dir->i_ctime = new_dir->i_mtime = old_dir->i_ctime; in ocfs2_rename() [all …]
|
/linux/fs/crypto/ |
A D | hooks.c | 72 struct inode *new_dir, struct dentry *new_dentry, in __fscrypt_prepare_rename() argument 83 if (old_dir != new_dir) { in __fscrypt_prepare_rename() 84 if (IS_ENCRYPTED(new_dir) && in __fscrypt_prepare_rename() 85 !fscrypt_has_permitted_context(new_dir, in __fscrypt_prepare_rename()
|
/linux/security/landlock/ |
A D | fs.c | 548 const struct path *const new_dir, in hook_path_link() argument 557 if (old_dentry->d_parent != new_dir->dentry) in hook_path_link() 562 return check_access_path(dom, new_dir, in hook_path_link() 576 const struct path *const new_dir, in hook_path_rename() argument 585 if (old_dir->dentry != new_dir->dentry) in hook_path_rename()
|
/linux/fs/ |
A D | libfs.c | 452 struct inode *new_dir, struct dentry *new_dentry) in simple_rename_exchange() argument 457 if (old_dir != new_dir && old_is_dir != new_is_dir) { in simple_rename_exchange() 460 inc_nlink(new_dir); in simple_rename_exchange() 462 drop_nlink(new_dir); in simple_rename_exchange() 467 new_dir->i_ctime = new_dir->i_mtime = in simple_rename_exchange() 476 struct dentry *old_dentry, struct inode *new_dir, in simple_rename() argument 486 return simple_rename_exchange(old_dir, old_dentry, new_dir, new_dentry); in simple_rename() 492 simple_unlink(new_dir, new_dentry); in simple_rename() 499 inc_nlink(new_dir); in simple_rename() 502 old_dir->i_ctime = old_dir->i_mtime = new_dir->i_ctime = in simple_rename() [all …]
|
/linux/fs/hfs/ |
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/fs/reiserfs/ |
A D | namei.c | 1312 struct inode *new_dir, struct dentry *new_dentry, in reiserfs_rename() argument 1348 retval = dquot_initialize(new_dir); in reiserfs_rename() 1419 reiserfs_add_entry(&th, new_dir, new_dentry->d_name.name, in reiserfs_rename() 1433 reiserfs_update_inode_transaction(new_dir); in reiserfs_rename() 1450 search_by_entry_key(new_dir->i_sb, &old_de.de_entry_key, in reiserfs_rename() 1466 reiserfs_find_entry(new_dir, new_dentry->d_name.name, in reiserfs_rename() 1489 search_by_entry_key(new_dir->i_sb, in reiserfs_rename() 1579 new_dir->i_ctime = new_dir->i_mtime = ctime; in reiserfs_rename() 1599 set_ino_in_dir_entry(&dot_dot_de, INODE_PKEY(new_dir)); in reiserfs_rename() 1607 INC_DIR_INODE_NLINK(new_dir); in reiserfs_rename() [all …]
|
/linux/fs/sysv/ |
A D | namei.c | 193 struct dentry *old_dentry, struct inode *new_dir, in sysv_rename() argument 240 inode_inc_link_count(new_dir); in sysv_rename() 247 sysv_set_link(dir_de, dir_page, new_dir); in sysv_rename()
|
/linux/fs/minix/ |
A D | namei.c | 189 struct inode *new_dir, struct dentry *new_dentry, in minix_rename() argument 236 inode_inc_link_count(new_dir); in minix_rename() 243 minix_set_link(dir_de, dir_page, new_dir); in minix_rename()
|