/fs/f2fs/ |
D | namei.c | 845 struct inode *new_dir, struct dentry *new_dentry, in f2fs_rename() argument 865 if (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) && in f2fs_rename() 866 (!projid_eq(F2FS_I(new_dir)->i_projid, in f2fs_rename() 874 err = dquot_initialize(new_dir); in f2fs_rename() 914 new_entry = f2fs_find_entry(new_dir, &new_dentry->d_name, in f2fs_rename() 930 f2fs_set_link(new_dir, new_entry, new_page, old_inode); in f2fs_rename() 955 f2fs_i_links_write(new_dir, true); in f2fs_rename() 985 f2fs_i_pino_write(old_inode, new_dir->i_ino); in f2fs_rename() 1004 if (old_dir != new_dir && !whiteout) in f2fs_rename() 1006 old_dir_page, new_dir); in f2fs_rename() [all …]
|
/fs/nfs/ |
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() 267 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { 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() [all …]
|
D | nfstrace.h | 686 const struct inode *new_dir, 690 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry), 695 __field(u64, new_dir) 703 __entry->new_dir = NFS_FILEID(new_dir); 714 (unsigned long long)__entry->new_dir, 723 const struct inode *new_dir, \ 726 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry)) 732 const struct inode *new_dir, 737 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error), 744 __field(u64, new_dir) [all …]
|
/fs/affs/ |
D | namei.c | 403 struct inode *new_dir, struct dentry *new_dentry) in affs_rename() argument 437 affs_lock_dir(new_dir); in affs_rename() 438 retval = affs_insert_hash(new_dir, bh); in affs_rename() 439 affs_unlock_dir(new_dir); in affs_rename() 443 mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir); in affs_rename() 450 struct inode *new_dir, struct dentry *new_dentry) in affs_xrename() argument 474 affs_lock_dir(new_dir); in affs_xrename() 475 retval = affs_remove_hash(new_dir, bh_new); in affs_xrename() 476 affs_unlock_dir(new_dir); in affs_xrename() 483 affs_lock_dir(new_dir); in affs_xrename() [all …]
|
/fs/ubifs/ |
D | dir.c | 1246 struct inode *new_dir, struct dentry *new_dentry, in do_rename() argument 1255 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename() 1277 new_dentry, new_dir->i_ino, flags); in do_rename() 1297 err = fscrypt_setup_filename(new_dir, &new_dentry->d_name, 0, &new_nm); in do_rename() 1342 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename() 1364 inc_nlink(new_dir); in do_rename() 1379 new_dir->i_mtime = new_dir->i_ctime = time; in do_rename() 1398 new_dir->i_size += new_sz; in do_rename() 1399 ubifs_inode(new_dir)->ui_size = new_dir->i_size; in do_rename() 1408 sync = IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir); in do_rename() [all …]
|
/fs/fat/ |
D | namei_msdos.c | 429 struct inode *new_dir, unsigned char *new_name, in do_msdos_rename() argument 451 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename() 460 err = fat_scan(new_dir, new_name, &sinfo); in do_msdos_rename() 503 err = msdos_add_entry(new_dir, new_name, is_dir, is_hid, 0, in do_msdos_rename() 509 inode_inc_iversion(new_dir); in do_msdos_rename() 517 if (IS_DIRSYNC(new_dir)) { in do_msdos_rename() 525 fat_set_start(dotdot_de, MSDOS_I(new_dir)->i_logstart); in do_msdos_rename() 527 if (IS_DIRSYNC(new_dir)) { in do_msdos_rename() 534 inc_nlink(new_dir); in do_msdos_rename() 582 int err2 = fat_remove_entries(new_dir, &sinfo); in do_msdos_rename() [all …]
|
D | namei_vfat.c | 896 struct inode *new_dir, struct dentry *new_dentry, in vfat_rename() argument 920 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename() 938 err = vfat_add_entry(new_dir, &new_dentry->d_name, is_dir, 0, in vfat_rename() 944 inode_inc_iversion(new_dir); in vfat_rename() 948 if (IS_DIRSYNC(new_dir)) { in vfat_rename() 956 fat_set_start(dotdot_de, MSDOS_I(new_dir)->i_logstart); in vfat_rename() 958 if (IS_DIRSYNC(new_dir)) { in vfat_rename() 965 inc_nlink(new_dir); in vfat_rename() 1014 int err2 = fat_remove_entries(new_dir, &sinfo); in vfat_rename() 1020 fat_fs_error(new_dir->i_sb, in vfat_rename()
|
/fs/jfs/ |
D | namei.c | 1062 struct inode *new_dir, struct dentry *new_dentry, in jfs_rename() argument 1090 rc = dquot_initialize(new_dir); in jfs_rename() 1115 rc = dtSearch(new_dir, &new_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename() 1147 tid = txBegin(new_dir->i_sb, 0); in jfs_rename() 1155 mutex_lock_nested(&JFS_IP(new_dir)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_rename() 1157 if (old_dir != new_dir) in jfs_rename() 1168 rc = dtModify(tid, new_dir, &new_dname, &ino, in jfs_rename() 1177 if (old_dir != new_dir) in jfs_rename() 1180 mutex_unlock(&JFS_IP(new_dir)->commit_mutex); in jfs_rename() 1209 rc = dtSearch(new_dir, &new_dname, &ino, &btstack, in jfs_rename() [all …]
|
/fs/ext2/ |
D | namei.c | 313 struct inode * new_dir, struct dentry * new_dentry, in ext2_rename() argument 331 err = dquot_initialize(new_dir); in ext2_rename() 357 new_de = ext2_find_entry (new_dir, &new_dentry->d_name, &new_page); in ext2_rename() 360 ext2_set_link(new_dir, new_de, new_page, old_inode, 1); in ext2_rename() 370 inode_inc_link_count(new_dir); in ext2_rename() 383 if (old_dir != new_dir) in ext2_rename() 384 ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0); in ext2_rename()
|
/fs/hpfs/ |
D | namei.c | 511 struct inode *new_dir, struct dentry *new_dentry, in hpfs_rename() argument 556 if ((nde = map_dirent(new_dir, hpfs_i(new_dir)->i_dno, new_name, new_len, NULL, &qbh1))) { in hpfs_rename() 564 hpfs_error(new_dir->i_sb, "hpfs_rename: could not find dirent"); in hpfs_rename() 572 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 574 if ((r = hpfs_add_dirent(new_dir, new_name, new_len, &de))) { in hpfs_rename() 575 if (r == -1) hpfs_error(new_dir->i_sb, "hpfs_rename: dirent already exists!"); in hpfs_rename() 577 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename() 581 if (new_dir == old_dir) in hpfs_rename() 595 hpfs_i(i)->i_parent_dir = new_dir->i_ino; in hpfs_rename() 597 inc_nlink(new_dir); in hpfs_rename() [all …]
|
/fs/crypto/ |
D | hooks.c | 73 struct inode *new_dir, struct dentry *new_dentry, in __fscrypt_prepare_rename() argument 82 err = fscrypt_require_key(new_dir); in __fscrypt_prepare_rename() 91 if (old_dir != new_dir) { in __fscrypt_prepare_rename() 92 if (IS_ENCRYPTED(new_dir) && in __fscrypt_prepare_rename() 93 !fscrypt_has_permitted_context(new_dir, in __fscrypt_prepare_rename()
|
/fs/debugfs/ |
D | inode.c | 835 struct dentry *new_dir, const char *new_name) in debugfs_rename() argument 843 if (IS_ERR(new_dir)) in debugfs_rename() 844 return new_dir; in debugfs_rename() 848 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 850 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 856 dentry = lookup_one_len(new_name, new_dir, strlen(new_name)); in debugfs_rename() 863 error = simple_rename(d_inode(old_dir), old_dentry, d_inode(new_dir), in debugfs_rename() 870 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 874 unlock_rename(new_dir, old_dir); in debugfs_rename() 880 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/fs/ufs/ |
D | namei.c | 244 struct inode *new_dir, struct dentry *new_dentry, in ufs_rename() argument 278 new_de = ufs_find_entry(new_dir, &new_dentry->d_name, &new_page); in ufs_rename() 281 ufs_set_link(new_dir, new_de, new_page, old_inode, 1); in ufs_rename() 291 inode_inc_link_count(new_dir); in ufs_rename() 304 if (old_dir != new_dir) in ufs_rename() 305 ufs_set_link(old_inode, dir_de, dir_page, new_dir, 0); in ufs_rename()
|
/fs/ocfs2/ |
D | namei.c | 1194 struct inode *new_dir, in ocfs2_rename() argument 1227 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename() 1236 status = dquot_initialize(new_dir); in ocfs2_rename() 1260 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename() 1270 status = ocfs2_check_if_ancestor(osb, new_dir->i_ino, in ocfs2_rename() 1279 (unsigned long long)new_dir->i_ino); in ocfs2_rename() 1286 &new_dir_bh, new_dir, 1); in ocfs2_rename() 1293 if (!new_dir->i_nlink) { in ocfs2_rename() 1349 if (!new_inode && new_dir != old_dir && in ocfs2_rename() 1350 new_dir->i_nlink >= ocfs2_link_max(osb)) { in ocfs2_rename() [all …]
|
D | dcache.c | 443 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument 455 if (old_dir == new_dir) in ocfs2_dentry_move() 461 ret = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(new_dir)->ip_blkno); in ocfs2_dentry_move()
|
/fs/nilfs2/ |
D | namei.c | 342 struct inode *new_dir, struct dentry *new_dentry, in nilfs_rename() argument 382 new_de = nilfs_find_entry(new_dir, &new_dentry->d_name, &new_page); in nilfs_rename() 385 nilfs_set_link(new_dir, new_de, new_page, old_inode); in nilfs_rename() 386 nilfs_mark_inode_dirty(new_dir); in nilfs_rename() 397 inc_nlink(new_dir); in nilfs_rename() 398 nilfs_mark_inode_dirty(new_dir); in nilfs_rename() 411 nilfs_set_link(old_inode, dir_de, dir_page, new_dir); in nilfs_rename()
|
/fs/hfs/ |
D | dir.c | 283 struct inode *new_dir, struct dentry *new_dentry, in hfs_rename() argument 293 res = hfs_remove(new_dir, new_dentry); in hfs_rename() 300 new_dir, &new_dentry->d_name); in hfs_rename() 304 new_dir->i_ino, &new_dentry->d_name); in hfs_rename()
|
/fs/reiserfs/ |
D | namei.c | 1308 struct inode *new_dir, struct dentry *new_dentry, in reiserfs_rename() argument 1344 retval = dquot_initialize(new_dir); in reiserfs_rename() 1415 reiserfs_add_entry(&th, new_dir, new_dentry->d_name.name, in reiserfs_rename() 1429 reiserfs_update_inode_transaction(new_dir); in reiserfs_rename() 1446 search_by_entry_key(new_dir->i_sb, &old_de.de_entry_key, in reiserfs_rename() 1462 reiserfs_find_entry(new_dir, new_dentry->d_name.name, in reiserfs_rename() 1485 search_by_entry_key(new_dir->i_sb, in reiserfs_rename() 1575 new_dir->i_ctime = new_dir->i_mtime = ctime; in reiserfs_rename() 1595 set_ino_in_dir_entry(&dot_dot_de, INODE_PKEY(new_dir)); in reiserfs_rename() 1603 INC_DIR_INODE_NLINK(new_dir); in reiserfs_rename() [all …]
|
/fs/coda/ |
D | dir.c | 295 struct inode *new_dir, struct dentry *new_dentry, in coda_rename() argument 308 coda_i2f(new_dir), old_length, new_length, in coda_rename() 314 coda_dir_inc_nlink(new_dir); in coda_rename() 317 coda_dir_update_mtime(new_dir); in coda_rename() 321 coda_flag_inode(new_dir, C_VATTR); in coda_rename()
|
/fs/minix/ |
D | namei.c | 185 struct inode * new_dir, struct dentry *new_dentry, in minix_rename() argument 232 inode_inc_link_count(new_dir); in minix_rename() 239 minix_set_link(dir_de, dir_page, new_dir); in minix_rename()
|
/fs/sysv/ |
D | namei.c | 190 struct inode * new_dir, struct dentry * new_dentry, in sysv_rename() argument 237 inode_inc_link_count(new_dir); in sysv_rename() 244 sysv_set_link(dir_de, dir_page, new_dir); in sysv_rename()
|
/fs/udf/ |
D | namei.c | 1070 struct inode *new_dir, struct dentry *new_dentry, in udf_rename() argument 1101 nfi = udf_find_entry(new_dir, &new_dentry->d_name, &nfibh, &ncfi); in udf_rename() 1143 nfi = udf_add_entry(new_dir, new_dentry, &nfibh, &ncfi, in udf_rename() 1162 udf_write_fi(new_dir, &ncfi, nfi, &nfibh, NULL, NULL); in udf_rename() 1173 new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir); in udf_rename() 1175 mark_inode_dirty(new_dir); in udf_rename() 1178 dir_fi->icb.extLocation = cpu_to_lelb(UDF_I(new_dir)->i_location); in udf_rename() 1189 inc_nlink(new_dir); in udf_rename() 1190 mark_inode_dirty(new_dir); in udf_rename()
|
/fs/orangefs/ |
D | namei.c | 377 struct inode *new_dir, in orangefs_rename() argument 394 iattr.ia_mtime = iattr.ia_ctime = current_time(new_dir); in orangefs_rename() 395 __orangefs_setattr(new_dir, &iattr); in orangefs_rename() 402 new_op->upcall.req.rename.new_parent_refn = ORANGEFS_I(new_dir)->refn; in orangefs_rename()
|
/fs/sdcardfs/ |
D | inode.c | 399 struct inode *new_dir, struct dentry *new_dentry, in sdcardfs_rename() argument 416 !check_caller_access_to_name(new_dir, &new_dentry->d_name)) { in sdcardfs_rename() 423 SDCARDFS_I(new_dir)->data); in sdcardfs_rename() 455 sdcardfs_copy_and_fix_attrs(new_dir, d_inode(lower_new_dir_dentry)); in sdcardfs_rename() 456 fsstack_copy_inode_size(new_dir, d_inode(lower_new_dir_dentry)); in sdcardfs_rename() 458 if (new_dir != old_dir) { in sdcardfs_rename()
|
/fs/bfs/ |
D | dir.c | 203 struct inode *new_dir, struct dentry *new_dentry, in bfs_rename() argument 230 new_bh = bfs_find_entry(new_dir, &new_dentry->d_name, &new_de); in bfs_rename() 237 error = bfs_add_entry(new_dir, &new_dentry->d_name, in bfs_rename()
|