Home
last modified time | relevance | path

Searched refs:new_dir (Results 1 – 25 of 75) sorted by relevance

123

/linux/fs/f2fs/
H A Dnamei.c886 struct dentry *old_dentry, struct inode *new_dir, in f2fs_rename() argument
906 if (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) && in f2fs_rename()
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()
976 new_entry = f2fs_find_entry(new_dir, &new_dentry->d_name, in f2fs_rename()
992 f2fs_set_link(new_dir, new_entry, new_page, old_inode); in f2fs_rename()
1018 f2fs_i_links_write(new_dir, true); in f2fs_rename()
1026 f2fs_i_pino_write(old_inode, new_dir->i_ino); in f2fs_rename()
[all …]
/linux/fs/nfs/
H A Dunlink.c269 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()
274 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { 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()
340 nfs_async_rename(struct inode *old_dir, struct inode *new_dir, in nfs_async_rename() argument
355 nfs_server_capable(new_dir, NFS_CAP_MOVEABLE)) in nfs_async_rename()
[all …]
H A Dnfstrace.h804 const struct inode *new_dir,
808 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry),
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, \
844 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry))
850 const struct inode *new_dir,
855 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error),
862 __field(u64, new_dir)
[all …]
/linux/fs/affs/
H A Dnamei.c406 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 …]
/linux/fs/fat/
H A Dnamei_vfat.c932 struct inode *new_dir, struct dentry *new_dentry) in vfat_rename() argument
951 if (old_dir != new_dir) { in vfat_rename()
968 err = vfat_add_entry(new_dir, &new_dentry->d_name, is_dir, 0, in vfat_rename()
974 inode_inc_iversion(new_dir); in vfat_rename()
978 err = vfat_sync_ipos(new_dir, old_inode); in vfat_rename()
983 err = vfat_update_dotdot_de(new_dir, old_inode, dotdot_bh, in vfat_rename()
989 inc_nlink(new_dir); in vfat_rename()
1032 int err2 = fat_remove_entries(new_dir, &sinfo); in vfat_rename()
1038 fat_fs_error(new_dir->i_sb, in vfat_rename()
1061 struct inode *new_dir, struct dentry *new_dentry) in vfat_rename_exchange() argument
[all …]
H A Dnamei_msdos.c430 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 …]
/linux/fs/ubifs/
H A Ddir.c1322 struct inode *new_dir, struct dentry *new_dentry, in do_rename() argument
1331 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename()
1354 new_dentry, new_dir->i_ino, flags); in do_rename()
1376 err = fscrypt_setup_filename(new_dir, &new_dentry->d_name, 0, &new_nm); 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()
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()
1506 sync = IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir); in do_rename()
[all …]
/linux/fs/jfs/
H A Dnamei.c1069 struct dentry *old_dentry, struct inode *new_dir, in jfs_rename() argument
1097 rc = dquot_initialize(new_dir); in jfs_rename()
1122 rc = dtSearch(new_dir, &new_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename()
1154 tid = txBegin(new_dir->i_sb, 0); in jfs_rename()
1162 mutex_lock_nested(&JFS_IP(new_dir)->commit_mutex, COMMIT_MUTEX_PARENT); in jfs_rename()
1164 if (old_dir != new_dir) in jfs_rename()
1175 rc = dtModify(tid, new_dir, &new_dname, &ino, in jfs_rename()
1184 if (old_dir != new_dir) in jfs_rename()
1187 mutex_unlock(&JFS_IP(new_dir)->commit_mutex); in jfs_rename()
1216 rc = dtSearch(new_dir, &new_dname, &ino, &btstack, in jfs_rename()
[all …]
/linux/fs/ext2/
H A Dnamei.c319 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 Dnamei.c245 struct dentry *old_dentry, struct inode *new_dir, in ufs_rename() argument
279 new_de = ufs_find_entry(new_dir, &new_dentry->d_name, &new_folio); in ufs_rename()
282 err = ufs_set_link(new_dir, new_de, new_folio, old_inode, 1); in ufs_rename()
295 inode_inc_link_count(new_dir); in ufs_rename()
307 if (old_dir != new_dir) in ufs_rename()
309 new_dir, 0); in ufs_rename()
/linux/fs/hpfs/
H A Dnamei.c498 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()
562 if (r == -1) hpfs_error(new_dir->i_sb, "hpfs_rename: dirent already exists!"); 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()
[all …]
/linux/fs/debugfs/
H A Dinode.c859 struct dentry *new_dir, const char *new_name) in debugfs_rename() argument
867 if (IS_ERR(new_dir)) in debugfs_rename()
868 return new_dir; in debugfs_rename()
872 trap = lock_rename(new_dir, old_dir); in debugfs_rename()
874 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename()
880 dentry = lookup_one_len(new_name, new_dir, strlen(new_name)); in debugfs_rename()
888 d_inode(new_dir), dentry, 0); in debugfs_rename()
894 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename()
898 unlock_rename(new_dir, old_dir); in debugfs_rename()
904 unlock_rename(new_dir, old_dir); in debugfs_rename()
/linux/fs/ntfs3/
H A Dnamei.c235 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/exfat/
H A Dnamei.c1235 struct inode *new_dir, struct dentry *new_dentry, in exfat_rename() argument
1242 loff_t size = i_size_read(new_dir); in exfat_rename()
1256 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename()
1260 inode_inc_iversion(new_dir); in exfat_rename()
1261 simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); in exfat_rename()
1262 EXFAT_I(new_dir)->i_crtime = current_time(new_dir); in exfat_rename()
1263 exfat_truncate_inode_atime(new_dir); in exfat_rename()
1264 if (IS_DIRSYNC(new_dir) && size != i_size_read(new_dir)) in exfat_rename()
1265 exfat_sync_inode(new_dir); in exfat_rename()
1267 mark_inode_dirty(new_dir); in exfat_rename()
[all …]
/linux/fs/
H A Dlibfs.c379 struct inode *new_dir, struct dentry *new_dentry) in simple_offset_rename() argument
382 struct offset_ctx *new_ctx = new_dir->i_op->get_offset_ctx(new_dir); in simple_offset_rename()
409 struct inode *new_dir, in simple_offset_rename_exchange() argument
413 struct offset_ctx *new_ctx = new_dir->i_op->get_offset_ctx(new_dir); in simple_offset_rename_exchange()
431 ret = simple_rename_exchange(old_dir, old_dentry, new_dir, new_dentry); in simple_offset_rename_exchange()
812 struct inode *new_dir, struct dentry *new_dentry) in simple_rename_timestamp() argument
817 if (new_dir != old_dir) in simple_rename_timestamp()
818 inode_set_mtime_to_ts(new_dir, in simple_rename_timestamp()
819 inode_set_ctime_current(new_dir)); in simple_rename_timestamp()
827 struct inode *new_dir, struct dentry *new_dentry) in simple_rename_exchange() argument
[all …]
/linux/fs/nilfs2/
H A Dnamei.c363 struct inode *new_dir, struct dentry *new_dentry, in nilfs_rename() argument
403 new_de = nilfs_find_entry(new_dir, &new_dentry->d_name, in nilfs_rename()
409 nilfs_set_link(new_dir, new_de, new_folio, old_inode); in nilfs_rename()
411 nilfs_mark_inode_dirty(new_dir); in nilfs_rename()
422 inc_nlink(new_dir); in nilfs_rename()
423 nilfs_mark_inode_dirty(new_dir); in nilfs_rename()
436 nilfs_set_link(old_inode, dir_de, dir_folio, new_dir); in nilfs_rename()
/linux/fs/ocfs2/
H A Dnamei.c1205 struct inode *new_dir, in ocfs2_rename() argument
1238 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename()
1247 status = dquot_initialize(new_dir); in ocfs2_rename()
1271 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
1281 status = ocfs2_check_if_ancestor(osb, new_dir->i_ino, in ocfs2_rename()
1290 (unsigned long long)new_dir->i_ino); in ocfs2_rename()
1297 &new_dir_bh, new_dir, 1); in ocfs2_rename()
1304 if (!new_dir->i_nlink) { in ocfs2_rename()
1343 if (S_ISDIR(old_inode->i_mode) && new_dir != old_dir) { in ocfs2_rename()
1360 if (!new_inode && new_dir->i_nlink >= ocfs2_link_max(osb)) { in ocfs2_rename()
[all …]
H A Ddcache.c434 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 Dhooks.c90 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 Ddir.c284 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 Dfs.c1089 const struct path *const new_dir, in current_check_refer_path() argument
1123 if (old_dentry->d_parent == new_dir->dentry) { in current_check_refer_path()
1132 dom, new_dir, access_request_parent1, in current_check_refer_path()
1142 mnt_dir.mnt = new_dir->mnt; in current_check_refer_path()
1143 mnt_dir.dentry = new_dir->mnt->mnt_root; in current_check_refer_path()
1158 dom, mnt_dir.dentry, new_dir->dentry, &layer_masks_parent2); in current_check_refer_path()
1389 const struct path *const new_dir, in hook_path_link() argument
1392 return current_check_refer_path(old_dentry, new_dir, new_dentry, false, in hook_path_link()
1398 const struct path *const new_dir, in hook_path_rename() argument
1403 return current_check_refer_path(old_dentry, new_dir, new_dentry, true, in hook_path_rename()
/linux/fs/udf/
H A Dnamei.c766 struct dentry *old_dentry, struct inode *new_dir, in udf_rename() argument
807 if (is_dir && old_dir != new_dir) { in udf_rename()
831 retval = udf_fiiter_find_entry(new_dir, &new_dentry->d_name, &niter); in udf_rename()
843 retval = udf_fiiter_add_entry(new_dir, new_dentry, &niter); in udf_rename()
886 inode_set_mtime_to_ts(new_dir, inode_set_ctime_current(new_dir)); in udf_rename()
888 mark_inode_dirty(new_dir); in udf_rename()
892 cpu_to_lelb(UDF_I(new_dir)->i_location); in udf_rename()
902 inc_nlink(new_dir); in udf_rename()
903 mark_inode_dirty(new_dir); in udf_rename()
/linux/fs/sysv/
H A Dnamei.c192 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/minix/
H A Dnamei.c178 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()
/linux/fs/orangefs/
H A Dnamei.c375 struct inode *new_dir, in orangefs_rename() argument
392 iattr.ia_mtime = iattr.ia_ctime = current_time(new_dir); in orangefs_rename()
393 __orangefs_setattr(new_dir, &iattr); in orangefs_rename()
400 new_op->upcall.req.rename.new_parent_refn = ORANGEFS_I(new_dir)->refn; in orangefs_rename()

123