Home
last modified time | relevance | path

Searched refs:old_dir (Results 1 – 25 of 72) sorted by relevance

123

/kernel/linux/linux-5.10/fs/nfs/
Dunlink.c261 struct inode *old_dir = data->old_dir; in nfs_async_rename_done() local
265 trace_nfs_sillyrename_rename(old_dir, old_dentry, in nfs_async_rename_done()
267 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done()
283 struct super_block *sb = data->old_dir->i_sb; in nfs_async_rename_release()
291 spin_lock(&data->old_dir->i_lock); in nfs_async_rename_release()
292 nfs_force_lookup_revalidate(data->old_dir); in nfs_async_rename_release()
293 spin_unlock(&data->old_dir->i_lock); in nfs_async_rename_release()
294 if (data->new_dir != data->old_dir) { in nfs_async_rename_release()
303 iput(data->old_dir); in nfs_async_rename_release()
313 NFS_PROTO(data->old_dir)->rename_rpc_prepare(task, data); in nfs_rename_prepare()
[all …]
Dnfstrace.h739 const struct inode *old_dir,
745 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry),
749 __field(u64, old_dir)
756 __entry->dev = old_dir->i_sb->s_dev;
757 __entry->old_dir = NFS_FILEID(old_dir);
766 (unsigned long long)__entry->old_dir,
776 const struct inode *old_dir, \
781 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry))
785 const struct inode *old_dir,
792 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error),
[all …]
/kernel/linux/linux-5.10/fs/affs/
Dnamei.c402 affs_rename(struct inode *old_dir, struct dentry *old_dentry, in affs_rename() argument
405 struct super_block *sb = old_dir->i_sb; in affs_rename()
428 affs_lock_dir(old_dir); in affs_rename()
429 retval = affs_remove_hash(old_dir, bh); in affs_rename()
430 affs_unlock_dir(old_dir); in affs_rename()
443 mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir); in affs_rename()
449 affs_xrename(struct inode *old_dir, struct dentry *old_dentry, in affs_xrename() argument
453 struct super_block *sb = old_dir->i_sb; in affs_xrename()
469 affs_lock_dir(old_dir); in affs_xrename()
470 retval = affs_remove_hash(old_dir, bh_old); in affs_xrename()
[all …]
/kernel/linux/linux-5.10/fs/fat/
Dnamei_msdos.c427 static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, in do_msdos_rename() argument
444 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename()
451 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename()
472 if (IS_DIRSYNC(old_dir)) { in do_msdos_rename()
481 inode_inc_iversion(old_dir); in do_msdos_rename()
482 fat_truncate_time(old_dir, NULL, S_CTIME|S_MTIME); in do_msdos_rename()
483 if (IS_DIRSYNC(old_dir)) in do_msdos_rename()
484 (void)fat_sync_inode(old_dir); in do_msdos_rename()
486 mark_inode_dirty(old_dir); in do_msdos_rename()
532 drop_nlink(old_dir); in do_msdos_rename()
[all …]
Dnamei_vfat.c895 static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename() argument
906 struct super_block *sb = old_dir->i_sb; in vfat_rename()
915 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename()
920 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename()
928 ts = current_time(old_dir); in vfat_rename()
963 drop_nlink(old_dir); in vfat_rename()
968 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in vfat_rename()
972 inode_inc_iversion(old_dir); in vfat_rename()
973 fat_truncate_time(old_dir, &ts, S_CTIME|S_MTIME); in vfat_rename()
974 if (IS_DIRSYNC(old_dir)) in vfat_rename()
[all …]
/kernel/linux/linux-5.10/fs/ubifs/
Ddir.c1282 static int do_rename(struct inode *old_dir, struct dentry *old_dentry, in do_rename() argument
1286 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in do_rename()
1292 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename()
1315 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename()
1332 err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &old_nm); in do_rename()
1373 whiteout = create_whiteout(old_dir, old_dentry); in do_rename()
1405 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename()
1411 time = current_time(old_dir); in do_rename()
1421 drop_nlink(old_dir); in do_rename()
1435 drop_nlink(old_dir); in do_rename()
[all …]
/kernel/linux/linux-5.10/fs/f2fs/
Dnamei.c908 static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, in f2fs_rename() argument
912 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); in f2fs_rename()
941 if (old_dir == new_dir && !new_inode) { in f2fs_rename()
942 err = f2fs_try_convert_inline_dir(old_dir, new_dentry); in f2fs_rename()
948 err = f2fs_create_whiteout(old_dir, &whiteout); in f2fs_rename()
953 err = dquot_initialize(old_dir); in f2fs_rename()
968 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename()
1047 f2fs_delete_entry(old_entry, old_page, old_dir, NULL); in f2fs_rename()
1064 if (old_dir != new_dir && !whiteout) in f2fs_rename()
1069 f2fs_i_links_write(old_dir, false); in f2fs_rename()
[all …]
/kernel/linux/linux-5.10/fs/reiserfs/
Dnamei.c1307 static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, in reiserfs_rename() argument
1339 4 * REISERFS_QUOTA_TRANS_BLOCKS(old_dir->i_sb); in reiserfs_rename()
1341 retval = dquot_initialize(old_dir); in reiserfs_rename()
1356 reiserfs_write_lock(old_dir->i_sb); in reiserfs_rename()
1358 reiserfs_find_entry(old_dir, old_dentry->d_name.name, in reiserfs_rename()
1363 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1368 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1381 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1396 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1401 if (dot_dot_de.de_objectid != old_dir->i_ino) { in reiserfs_rename()
[all …]
/kernel/linux/linux-5.10/fs/jfs/
Dnamei.c1061 static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, in jfs_rename() argument
1087 rc = dquot_initialize(old_dir); in jfs_rename()
1106 rc = dtSearch(old_dir, &old_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename()
1157 if (old_dir != new_dir) in jfs_rename()
1158 mutex_lock_nested(&JFS_IP(old_dir)->commit_mutex, in jfs_rename()
1177 if (old_dir != new_dir) in jfs_rename()
1178 mutex_unlock(&JFS_IP(old_dir)->commit_mutex); in jfs_rename()
1232 rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); in jfs_rename()
1240 drop_nlink(old_dir); in jfs_rename()
1241 if (old_dir != new_dir) { in jfs_rename()
[all …]
/kernel/linux/linux-5.10/fs/bfs/
Ddir.c202 static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry, in bfs_rename() argument
223 old_bh = bfs_find_entry(old_dir, &old_dentry->d_name, &old_de); in bfs_rename()
243 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in bfs_rename()
244 mark_inode_dirty(old_dir); in bfs_rename()
249 mark_buffer_dirty_inode(old_bh, old_dir); in bfs_rename()
/kernel/linux/linux-5.10/fs/crypto/
Dhooks.c74 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument
80 err = fscrypt_require_key(old_dir); in __fscrypt_prepare_rename()
93 if (old_dir != new_dir) { in __fscrypt_prepare_rename()
100 IS_ENCRYPTED(old_dir) && in __fscrypt_prepare_rename()
101 !fscrypt_has_permitted_context(old_dir, in __fscrypt_prepare_rename()
/kernel/linux/linux-5.10/fs/debugfs/
Dinode.c755 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument
762 if (IS_ERR(old_dir)) in debugfs_rename()
763 return old_dir; in debugfs_rename()
769 trap = lock_rename(new_dir, old_dir); in debugfs_rename()
771 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename()
784 error = simple_rename(d_inode(old_dir), old_dentry, d_inode(new_dir), in debugfs_rename()
791 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename()
795 unlock_rename(new_dir, old_dir); in debugfs_rename()
801 unlock_rename(new_dir, old_dir); in debugfs_rename()
/kernel/linux/linux-5.10/fs/hpfs/
Dnamei.c510 static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, in hpfs_rename() argument
545 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename()
555 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) { in hpfs_rename()
572 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename()
577 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename()
581 if (new_dir == old_dir) in hpfs_rename()
582 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename()
588 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 0))) { in hpfs_rename()
598 drop_nlink(old_dir); in hpfs_rename()
610 hpfs_update_directory_times(old_dir); in hpfs_rename()
/kernel/linux/linux-5.10/fs/ocfs2/
Dnamei.c685 struct inode *old_dir = d_inode(old_dentry->d_parent); in ocfs2_link() local
709 err = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_link()
735 err = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_link()
828 ocfs2_double_unlock(old_dir, dir); in ocfs2_link()
1198 static int ocfs2_rename(struct inode *old_dir, in ocfs2_rename() argument
1218 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename()
1233 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename()
1237 status = dquot_initialize(old_dir); in ocfs2_rename()
1248 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename()
1266 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
[all …]
Ddcache.c443 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument
446 struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); in ocfs2_dentry_move()
455 if (old_dir == new_dir) in ocfs2_dentry_move()
Ddcache.h40 struct inode *old_dir, struct inode *new_dir);
/kernel/linux/linux-5.10/fs/ufs/
Dnamei.c243 static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, in ufs_rename() argument
258 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); in ufs_rename()
300 ufs_delete_entry(old_dir, old_de, old_page); in ufs_rename()
304 if (old_dir != new_dir) in ufs_rename()
310 inode_dec_link_count(old_dir); in ufs_rename()
/kernel/linux/linux-5.10/fs/nilfs2/
Dnamei.c341 static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, in nilfs_rename() argument
357 err = nilfs_transaction_begin(old_dir->i_sb, &ti, 1); in nilfs_rename()
362 old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_page); in nilfs_rename()
412 drop_nlink(old_dir); in nilfs_rename()
414 nilfs_mark_inode_dirty(old_dir); in nilfs_rename()
417 err = nilfs_transaction_commit(old_dir->i_sb); in nilfs_rename()
429 nilfs_transaction_abort(old_dir->i_sb); in nilfs_rename()
/kernel/linux/linux-5.10/fs/ext2/
Dnamei.c318 static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument
333 err = dquot_initialize(old_dir); in ext2_rename()
341 old_de = ext2_find_entry(old_dir, &old_dentry->d_name, &old_page); in ext2_rename()
390 if (old_dir != new_dir) in ext2_rename()
396 inode_dec_link_count(old_dir); in ext2_rename()
/kernel/linux/linux-5.10/fs/coda/
Ddir.c294 static int coda_rename(struct inode *old_dir, struct dentry *old_dentry, in coda_rename() argument
307 error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), in coda_rename()
313 coda_dir_drop_nlink(old_dir); in coda_rename()
316 coda_dir_update_mtime(old_dir); in coda_rename()
320 coda_flag_inode(old_dir, C_VATTR); in coda_rename()
/kernel/linux/linux-5.10/include/linux/
Dfsnotify.h129 static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, in fsnotify_move() argument
140 if (old_dir == new_dir) in fsnotify_move()
148 fsnotify_name(old_dir, old_dir_mask, source, old_name, fs_cookie); in fsnotify_move()
Dfscrypt.h240 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry,
525 static inline int __fscrypt_prepare_rename(struct inode *old_dir, in __fscrypt_prepare_rename() argument
761 static inline int fscrypt_prepare_rename(struct inode *old_dir, in fscrypt_prepare_rename() argument
767 if (IS_ENCRYPTED(old_dir) || IS_ENCRYPTED(new_dir)) in fscrypt_prepare_rename()
768 return __fscrypt_prepare_rename(old_dir, old_dentry, in fscrypt_prepare_rename()
/kernel/linux/linux-5.10/fs/exfat/
Dnamei.c1321 static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry, in exfat_rename() argument
1326 struct super_block *sb = old_dir->i_sb; in exfat_rename()
1342 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename()
1364 if (S_ISDIR(old_inode->i_mode) && old_dir != new_dir) { in exfat_rename()
1365 drop_nlink(old_dir); in exfat_rename()
1370 inode_inc_iversion(old_dir); in exfat_rename()
1371 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in exfat_rename()
1372 if (IS_DIRSYNC(old_dir)) in exfat_rename()
1373 exfat_sync_inode(old_dir); in exfat_rename()
1375 mark_inode_dirty(old_dir); in exfat_rename()
/kernel/linux/linux-5.10/fs/hfs/
Ddir.c282 static int hfs_rename(struct inode *old_dir, struct dentry *old_dentry, in hfs_rename() argument
299 old_dir, &old_dentry->d_name, in hfs_rename()
302 hfs_cat_build_key(old_dir->i_sb, in hfs_rename()
/kernel/linux/linux-5.10/fs/udf/
Dnamei.c1075 static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, in udf_rename() argument
1092 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1103 if (!ofi || udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) in udf_rename()
1145 old_dir->i_ino) in udf_rename()
1171 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1172 udf_delete_entry(old_dir, ofi, &ofibh, &ocfi); in udf_rename()
1178 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in udf_rename()
1180 mark_inode_dirty(old_dir); in udf_rename()
1191 inode_dec_link_count(old_dir); in udf_rename()

123