Home
last modified time | relevance | path

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

123

/Linux-v4.19/fs/nfs/
Dunlink.c265 struct inode *old_dir = data->old_dir; in nfs_async_rename_done() local
269 trace_nfs_sillyrename_rename(old_dir, old_dentry, in nfs_async_rename_done()
271 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done()
287 struct super_block *sb = data->old_dir->i_sb; in nfs_async_rename_release()
295 spin_lock(&data->old_dir->i_lock); in nfs_async_rename_release()
296 nfs_force_lookup_revalidate(data->old_dir); in nfs_async_rename_release()
297 spin_unlock(&data->old_dir->i_lock); in nfs_async_rename_release()
298 if (data->new_dir != data->old_dir) { in nfs_async_rename_release()
307 iput(data->old_dir); in nfs_async_rename_release()
317 NFS_PROTO(data->old_dir)->rename_rpc_prepare(task, data); in nfs_rename_prepare()
[all …]
Dnfstrace.h588 const struct inode *old_dir,
594 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry),
598 __field(u64, old_dir)
605 __entry->dev = old_dir->i_sb->s_dev;
606 __entry->old_dir = NFS_FILEID(old_dir);
615 (unsigned long long)__entry->old_dir,
625 const struct inode *old_dir, \
630 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry))
634 const struct inode *old_dir,
641 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error),
[all …]
/Linux-v4.19/fs/fat/
Dnamei_msdos.c426 static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, in do_msdos_rename() argument
443 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename()
450 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename()
471 if (IS_DIRSYNC(old_dir)) { in do_msdos_rename()
480 inode_inc_iversion(old_dir); in do_msdos_rename()
481 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in do_msdos_rename()
482 if (IS_DIRSYNC(old_dir)) in do_msdos_rename()
483 (void)fat_sync_inode(old_dir); in do_msdos_rename()
485 mark_inode_dirty(old_dir); in do_msdos_rename()
531 drop_nlink(old_dir); in do_msdos_rename()
[all …]
Dnamei_vfat.c894 static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename() argument
905 struct super_block *sb = old_dir->i_sb; in vfat_rename()
914 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename()
919 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename()
927 ts = current_time(old_dir); in vfat_rename()
962 drop_nlink(old_dir); in vfat_rename()
967 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in vfat_rename()
971 inode_inc_iversion(old_dir); in vfat_rename()
972 old_dir->i_ctime = old_dir->i_mtime = ts; in vfat_rename()
973 if (IS_DIRSYNC(old_dir)) in vfat_rename()
[all …]
/Linux-v4.19/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()
467 affs_lock_dir(old_dir); in affs_xrename()
468 retval = affs_remove_hash(old_dir, bh_old); in affs_xrename()
[all …]
/Linux-v4.19/fs/ubifs/
Ddir.c1263 static int do_rename(struct inode *old_dir, struct dentry *old_dentry, in do_rename() argument
1267 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in do_rename()
1273 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename()
1294 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename()
1306 err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &old_nm); in do_rename()
1342 err = do_tmpfile(old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE, &whiteout); in do_rename()
1355 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename()
1361 time = current_time(old_dir); in do_rename()
1371 drop_nlink(old_dir); in do_rename()
1385 drop_nlink(old_dir); in do_rename()
[all …]
Djournal.c1088 int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir, in ubifs_jnl_rename() argument
1102 int move = (old_dir != new_dir); in ubifs_jnl_rename()
1105 ubifs_assert(c, ubifs_inode(old_dir)->data_len == 0); in ubifs_jnl_rename()
1107 ubifs_assert(c, mutex_is_locked(&ubifs_inode(old_dir)->ui_mutex)); in ubifs_jnl_rename()
1149 dent_key_init_flash(c, &dent2->key, old_dir->i_ino, old_nm); in ubifs_jnl_rename()
1173 pack_inode(c, p, old_dir, 1); in ubifs_jnl_rename()
1175 pack_inode(c, p, old_dir, 0); in ubifs_jnl_rename()
1196 ubifs_wbuf_add_ino_nolock(wbuf, old_dir->i_ino); in ubifs_jnl_rename()
1210 dent_key_init(c, &key, old_dir->i_ino, old_nm); in ubifs_jnl_rename()
1221 dent_key_init(c, &key, old_dir->i_ino, old_nm); in ubifs_jnl_rename()
[all …]
/Linux-v4.19/fs/f2fs/
Dnamei.c812 static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, in f2fs_rename() argument
816 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); in f2fs_rename()
825 bool is_old_inline = f2fs_has_inline_dentry(old_dir); in f2fs_rename()
836 err = dquot_initialize(old_dir); in f2fs_rename()
850 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename()
867 err = f2fs_create_whiteout(old_dir, &whiteout); in f2fs_rename()
929 if (is_old_inline && !f2fs_has_inline_dentry(old_dir)) { in f2fs_rename()
933 old_entry = f2fs_find_entry(old_dir, in f2fs_rename()
955 f2fs_delete_entry(old_entry, old_page, old_dir, NULL); in f2fs_rename()
968 if (old_dir != new_dir && !whiteout) in f2fs_rename()
[all …]
/Linux-v4.19/fs/reiserfs/
Dnamei.c1304 static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, in reiserfs_rename() argument
1336 4 * REISERFS_QUOTA_TRANS_BLOCKS(old_dir->i_sb); in reiserfs_rename()
1338 retval = dquot_initialize(old_dir); in reiserfs_rename()
1353 reiserfs_write_lock(old_dir->i_sb); in reiserfs_rename()
1355 reiserfs_find_entry(old_dir, old_dentry->d_name.name, in reiserfs_rename()
1360 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1365 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1378 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1393 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1398 if (dot_dot_de.de_objectid != old_dir->i_ino) { in reiserfs_rename()
[all …]
/Linux-v4.19/fs/crypto/
Dhooks.c67 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument
73 err = fscrypt_require_key(old_dir); in __fscrypt_prepare_rename()
81 if (old_dir != new_dir) { in __fscrypt_prepare_rename()
88 IS_ENCRYPTED(old_dir) && in __fscrypt_prepare_rename()
89 !fscrypt_has_permitted_context(old_dir, in __fscrypt_prepare_rename()
/Linux-v4.19/fs/jfs/
Dnamei.c1074 static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, in jfs_rename() argument
1100 rc = dquot_initialize(old_dir); in jfs_rename()
1119 rc = dtSearch(old_dir, &old_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename()
1170 if (old_dir != new_dir) in jfs_rename()
1171 mutex_lock_nested(&JFS_IP(old_dir)->commit_mutex, in jfs_rename()
1190 if (old_dir != new_dir) in jfs_rename()
1191 mutex_unlock(&JFS_IP(old_dir)->commit_mutex); in jfs_rename()
1245 rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); in jfs_rename()
1253 drop_nlink(old_dir); in jfs_rename()
1254 if (old_dir != new_dir) { in jfs_rename()
[all …]
/Linux-v4.19/include/linux/
Dfscrypt.h125 static inline int fscrypt_prepare_rename(struct inode *old_dir, in fscrypt_prepare_rename() argument
131 if (IS_ENCRYPTED(old_dir) || IS_ENCRYPTED(new_dir)) in fscrypt_prepare_rename()
132 return __fscrypt_prepare_rename(old_dir, old_dentry, in fscrypt_prepare_rename()
Dfsnotify.h66 static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, in fsnotify_move() argument
76 if (old_dir == new_dir) in fsnotify_move()
84 fsnotify(old_dir, old_dir_mask, source, FSNOTIFY_EVENT_INODE, old_name, in fsnotify_move()
/Linux-v4.19/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()
/Linux-v4.19/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()
/Linux-v4.19/fs/ocfs2/
Dnamei.c693 struct inode *old_dir = d_inode(old_dentry->d_parent); in ocfs2_link() local
717 err = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_link()
743 err = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_link()
836 ocfs2_double_unlock(old_dir, dir); in ocfs2_link()
1206 static int ocfs2_rename(struct inode *old_dir, in ocfs2_rename() argument
1226 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename()
1241 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename()
1245 status = dquot_initialize(old_dir); in ocfs2_rename()
1256 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename()
1274 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
[all …]
Ddcache.c445 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument
448 struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); in ocfs2_dentry_move()
457 if (old_dir == new_dir) in ocfs2_dentry_move()
/Linux-v4.19/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()
/Linux-v4.19/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()
/Linux-v4.19/fs/ext2/
Dnamei.c312 static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument
327 err = dquot_initialize(old_dir); in ext2_rename()
335 old_de = ext2_find_entry (old_dir, &old_dentry->d_name, &old_page); in ext2_rename()
383 if (old_dir != new_dir) in ext2_rename()
389 inode_dec_link_count(old_dir); in ext2_rename()
/Linux-v4.19/fs/debugfs/
Dinode.c783 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument
790 trap = lock_rename(new_dir, old_dir); in debugfs_rename()
792 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename()
805 error = simple_rename(d_inode(old_dir), old_dentry, d_inode(new_dir), in debugfs_rename()
812 fsnotify_move(d_inode(old_dir), d_inode(new_dir), old_name.name, in debugfs_rename()
816 unlock_rename(new_dir, old_dir); in debugfs_rename()
822 unlock_rename(new_dir, old_dir); in debugfs_rename()
/Linux-v4.19/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()
/Linux-v4.19/fs/ceph/
Ddir.c1066 static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, in ceph_rename() argument
1070 struct ceph_fs_client *fsc = ceph_sb_to_client(old_dir->i_sb); in ceph_rename()
1079 if (ceph_snap(old_dir) != ceph_snap(new_dir)) in ceph_rename()
1081 if (ceph_snap(old_dir) != CEPH_NOSNAP) { in ceph_rename()
1082 if (old_dir == new_dir && ceph_snap(old_dir) == CEPH_SNAPDIR) in ceph_rename()
1088 if ((old_dir != new_dir) && in ceph_rename()
1089 (!ceph_quota_is_same_realm(old_dir, new_dir))) in ceph_rename()
1093 old_dir, old_dentry, new_dir, new_dentry); in ceph_rename()
1097 ihold(old_dir); in ceph_rename()
1101 req->r_old_dentry_dir = old_dir; in ceph_rename()
[all …]
/Linux-v4.19/fs/exofs/
Dnamei.c229 static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, in exofs_rename() argument
244 old_de = exofs_find_entry(old_dir, old_dentry, &old_page); in exofs_rename()
289 inode_dec_link_count(old_dir); in exofs_rename()
/Linux-v4.19/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()

123