/fs/nfs/ |
D | unlink.c | 266 struct inode *new_dir = data->new_dir; in nfs_async_rename_done() local 270 new_dir, data->new_dentry, task->tk_status); in nfs_async_rename_done() 271 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done() 298 if (data->new_dir != data->old_dir) { in nfs_async_rename_release() 299 spin_lock(&data->new_dir->i_lock); in nfs_async_rename_release() 300 nfs_force_lookup_revalidate(data->new_dir); in nfs_async_rename_release() 301 spin_unlock(&data->new_dir->i_lock); in nfs_async_rename_release() 308 iput(data->new_dir); in nfs_async_rename_release() 337 nfs_async_rename(struct inode *old_dir, struct inode *new_dir, in nfs_async_rename() argument 352 nfs_server_capable(new_dir, NFS_CAP_MOVEABLE)) in nfs_async_rename() [all …]
|
D | nfstrace.h | 746 const struct inode *new_dir, 750 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry), 755 __field(u64, new_dir) 763 __entry->new_dir = NFS_FILEID(new_dir); 774 (unsigned long long)__entry->new_dir, 783 const struct inode *new_dir, \ 786 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry)) 792 const struct inode *new_dir, 797 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error), 804 __field(u64, new_dir) [all …]
|
/fs/f2fs/ |
D | namei.c | 950 struct dentry *old_dentry, struct inode *new_dir, in f2fs_rename() argument 969 if (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) && in f2fs_rename() 970 (!projid_eq(F2FS_I(new_dir)->i_projid, in f2fs_rename() 982 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 998 err = f2fs_dquot_initialize(new_dir); in f2fs_rename() 1032 new_entry = f2fs_find_entry(new_dir, &new_dentry->d_name, in f2fs_rename() 1048 f2fs_set_link(new_dir, new_entry, new_page, old_inode); in f2fs_rename() 1074 f2fs_i_links_write(new_dir, true); in f2fs_rename() 1082 f2fs_i_pino_write(old_inode, new_dir->i_ino); in f2fs_rename() 1105 if (old_dir != new_dir) in f2fs_rename() [all …]
|
/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 …]
|
/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() 1318 new_dentry, new_dir->i_ino, flags); in do_rename() 1340 err = fscrypt_setup_filename(new_dir, &new_dentry->d_name, 0, &new_nm); in do_rename() 1412 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename() 1434 inc_nlink(new_dir); in do_rename() 1449 new_dir->i_mtime = new_dir->i_ctime = time; in do_rename() 1468 new_dir->i_size += new_sz; in do_rename() 1469 ubifs_inode(new_dir)->ui_size = new_dir->i_size; in do_rename() 1478 sync = IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir); in do_rename() [all …]
|
/fs/fat/ |
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 …]
|
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()
|
/fs/ntfs3/ |
D | namei.c | 241 struct dentry *dentry, struct inode *new_dir, in ntfs_rename() argument 248 struct ntfs_inode *new_dir_ni = ntfs_i(new_dir); in ntfs_rename() 272 if (is_same && dir == new_dir) { in ntfs_rename() 286 err = ntfs_unlink_inode(new_dir, new_dentry); in ntfs_rename() 329 if (dir != new_dir) { in ntfs_rename() 330 new_dir->i_mtime = new_dir->i_ctime = dir->i_ctime; in ntfs_rename() 331 mark_inode_dirty(new_dir); in ntfs_rename() 337 if (IS_DIRSYNC(new_dir)) in ntfs_rename()
|
/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 …]
|
/fs/hpfs/ |
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() 579 if (r == -1) hpfs_error(new_dir->i_sb, "hpfs_rename: dirent already exists!"); 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() [all …]
|
/fs/debugfs/ |
D | inode.c | 792 struct dentry *new_dir, const char *new_name) in debugfs_rename() argument 800 if (IS_ERR(new_dir)) in debugfs_rename() 801 return new_dir; in debugfs_rename() 805 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 807 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 813 dentry = lookup_one_len(new_name, new_dir, strlen(new_name)); in debugfs_rename() 821 d_inode(new_dir), dentry, 0); in debugfs_rename() 827 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 831 unlock_rename(new_dir, old_dir); in debugfs_rename() 837 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/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()
|
/fs/ext2/ |
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()
|
/fs/exfat/ |
D | namei.c | 1323 struct inode *new_dir, struct dentry *new_dentry, in exfat_rename() argument 1343 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename() 1347 inode_inc_iversion(new_dir); in exfat_rename() 1348 new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime = in exfat_rename() 1349 EXFAT_I(new_dir)->i_crtime = current_time(new_dir); in exfat_rename() 1350 exfat_truncate_atime(&new_dir->i_atime); in exfat_rename() 1351 if (IS_DIRSYNC(new_dir)) in exfat_rename() 1352 exfat_sync_inode(new_dir); in exfat_rename() 1354 mark_inode_dirty(new_dir); in exfat_rename() 1360 if (IS_DIRSYNC(new_dir)) in exfat_rename() [all …]
|
/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()
|
/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()
|
/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()
|
/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()
|
/fs/reiserfs/ |
D | namei.c | 1316 struct inode *new_dir, struct dentry *new_dentry, in reiserfs_rename() argument 1352 retval = dquot_initialize(new_dir); in reiserfs_rename() 1423 reiserfs_add_entry(&th, new_dir, new_dentry->d_name.name, in reiserfs_rename() 1437 reiserfs_update_inode_transaction(new_dir); in reiserfs_rename() 1454 search_by_entry_key(new_dir->i_sb, &old_de.de_entry_key, in reiserfs_rename() 1470 reiserfs_find_entry(new_dir, new_dentry->d_name.name, in reiserfs_rename() 1493 search_by_entry_key(new_dir->i_sb, in reiserfs_rename() 1583 new_dir->i_ctime = new_dir->i_mtime = ctime; in reiserfs_rename() 1603 set_ino_in_dir_entry(&dot_dot_de, INODE_PKEY(new_dir)); in reiserfs_rename() 1611 INC_DIR_INODE_NLINK(new_dir); in reiserfs_rename() [all …]
|
/fs/coda/ |
D | dir.c | 299 struct dentry *old_dentry, struct inode *new_dir, in coda_rename() argument 312 coda_i2f(new_dir), old_length, new_length, in coda_rename() 318 coda_dir_inc_nlink(new_dir); in coda_rename() 321 coda_dir_update_mtime(new_dir); in coda_rename() 325 coda_flag_inode(new_dir, C_VATTR); in coda_rename()
|
/fs/sysv/ |
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()
|
/fs/minix/ |
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()
|
/fs/udf/ |
D | namei.c | 1077 struct dentry *old_dentry, struct inode *new_dir, in udf_rename() argument 1108 nfi = udf_find_entry(new_dir, &new_dentry->d_name, &nfibh, &ncfi); in udf_rename() 1150 nfi = udf_add_entry(new_dir, new_dentry, &nfibh, &ncfi, in udf_rename() 1169 udf_write_fi(new_dir, &ncfi, nfi, &nfibh, NULL, NULL); in udf_rename() 1180 new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir); in udf_rename() 1182 mark_inode_dirty(new_dir); in udf_rename() 1185 dir_fi->icb.extLocation = cpu_to_lelb(UDF_I(new_dir)->i_location); in udf_rename() 1196 inc_nlink(new_dir); in udf_rename() 1197 mark_inode_dirty(new_dir); in udf_rename()
|
/fs/orangefs/ |
D | namei.c | 381 struct inode *new_dir, in orangefs_rename() argument 398 iattr.ia_mtime = iattr.ia_ctime = current_time(new_dir); in orangefs_rename() 399 __orangefs_setattr(new_dir, &iattr); in orangefs_rename() 406 new_op->upcall.req.rename.new_parent_refn = ORANGEFS_I(new_dir)->refn; in orangefs_rename()
|