Home
last modified time | relevance | path

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

123

/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.h684 const struct inode *old_dir,
690 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry),
694 __field(u64, old_dir)
701 __entry->dev = old_dir->i_sb->s_dev;
702 __entry->old_dir = NFS_FILEID(old_dir);
711 (unsigned long long)__entry->old_dir,
721 const struct inode *old_dir, \
726 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry))
730 const struct inode *old_dir,
737 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error),
[all …]
/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 …]
/fs/ubifs/
Ddir.c1245 static int do_rename(struct inode *old_dir, struct dentry *old_dentry, in do_rename() argument
1249 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in do_rename()
1255 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename()
1276 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename()
1293 err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &old_nm); in do_rename()
1329 err = do_tmpfile(old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE, &whiteout); in do_rename()
1342 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename()
1348 time = current_time(old_dir); in do_rename()
1358 drop_nlink(old_dir); in do_rename()
1372 drop_nlink(old_dir); in do_rename()
[all …]
Djournal.c1209 int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir, in ubifs_jnl_rename() argument
1223 int move = (old_dir != new_dir); in ubifs_jnl_rename()
1231 ubifs_assert(c, ubifs_inode(old_dir)->data_len == 0); in ubifs_jnl_rename()
1233 ubifs_assert(c, mutex_is_locked(&ubifs_inode(old_dir)->ui_mutex)); in ubifs_jnl_rename()
1281 dent_key_init_flash(c, &dent2->key, old_dir->i_ino, old_nm); in ubifs_jnl_rename()
1312 pack_inode(c, p, old_dir, 1); in ubifs_jnl_rename()
1317 pack_inode(c, p, old_dir, 0); in ubifs_jnl_rename()
1345 ubifs_wbuf_add_ino_nolock(wbuf, old_dir->i_ino); in ubifs_jnl_rename()
1361 dent_key_init(c, &key, old_dir->i_ino, old_nm); in ubifs_jnl_rename()
1372 dent_key_init(c, &key, old_dir->i_ino, old_nm); in ubifs_jnl_rename()
[all …]
/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 …]
/fs/f2fs/
Dnamei.c844 static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, in f2fs_rename() argument
848 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); in f2fs_rename()
857 bool is_old_inline = f2fs_has_inline_dentry(old_dir); in f2fs_rename()
870 err = dquot_initialize(old_dir); in f2fs_rename()
885 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename()
902 err = f2fs_create_whiteout(old_dir, &whiteout); in f2fs_rename()
964 if (is_old_inline && !f2fs_has_inline_dentry(old_dir)) { in f2fs_rename()
968 old_entry = f2fs_find_entry(old_dir, in f2fs_rename()
991 f2fs_delete_entry(old_entry, old_page, old_dir, NULL); in f2fs_rename()
1004 if (old_dir != new_dir && !whiteout) in f2fs_rename()
[all …]
/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 …]
/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 …]
/fs/crypto/
Dhooks.c72 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument
78 err = fscrypt_require_key(old_dir); in __fscrypt_prepare_rename()
91 if (old_dir != new_dir) { in __fscrypt_prepare_rename()
98 IS_ENCRYPTED(old_dir) && in __fscrypt_prepare_rename()
99 !fscrypt_has_permitted_context(old_dir, in __fscrypt_prepare_rename()
/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()
/fs/ocfs2/
Dnamei.c679 struct inode *old_dir = d_inode(old_dentry->d_parent); in ocfs2_link() local
703 err = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_link()
729 err = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_link()
822 ocfs2_double_unlock(old_dir, dir); in ocfs2_link()
1192 static int ocfs2_rename(struct inode *old_dir, in ocfs2_rename() argument
1212 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename()
1227 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename()
1231 status = dquot_initialize(old_dir); in ocfs2_rename()
1242 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename()
1260 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()
/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()
/fs/debugfs/
Dinode.c834 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument
841 if (IS_ERR(old_dir)) in debugfs_rename()
842 return old_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()
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/
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()
/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()
/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()
/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()
/fs/udf/
Dnamei.c1069 static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, in udf_rename() argument
1086 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1097 if (!ofi || udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) in udf_rename()
1139 old_dir->i_ino) in udf_rename()
1165 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1166 udf_delete_entry(old_dir, ofi, &ofibh, &ocfi); in udf_rename()
1172 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in udf_rename()
1174 mark_inode_dirty(old_dir); in udf_rename()
1185 inode_dec_link_count(old_dir); in udf_rename()
/fs/sdcardfs/
Dinode.c398 static int sdcardfs_rename(struct inode *old_dir, struct dentry *old_dentry, in sdcardfs_rename() argument
415 if (!check_caller_access_to_name(old_dir, &old_dentry->d_name) || in sdcardfs_rename()
422 saved_cred = override_fsids(SDCARDFS_SB(old_dir->i_sb), in sdcardfs_rename()
458 if (new_dir != old_dir) { in sdcardfs_rename()
459 sdcardfs_copy_and_fix_attrs(old_dir, d_inode(lower_old_dir_dentry)); in sdcardfs_rename()
460 fsstack_copy_inode_size(old_dir, d_inode(lower_old_dir_dentry)); in sdcardfs_rename()
/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()
/fs/ceph/
Ddir.c1082 static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, in ceph_rename() argument
1086 struct ceph_fs_client *fsc = ceph_sb_to_client(old_dir->i_sb); in ceph_rename()
1095 if (ceph_snap(old_dir) != ceph_snap(new_dir)) in ceph_rename()
1097 if (ceph_snap(old_dir) != CEPH_NOSNAP) { in ceph_rename()
1098 if (old_dir == new_dir && ceph_snap(old_dir) == CEPH_SNAPDIR) in ceph_rename()
1104 if ((old_dir != new_dir) && in ceph_rename()
1105 (!ceph_quota_is_same_realm(old_dir, new_dir))) in ceph_rename()
1109 old_dir, old_dentry, new_dir, new_dentry); in ceph_rename()
1113 ihold(old_dir); in ceph_rename()
1117 req->r_old_dentry_dir = old_dir; in ceph_rename()
[all …]
/fs/
Dlibfs.c378 int simple_rename(struct inode *old_dir, struct dentry *old_dentry, in simple_rename() argument
395 drop_nlink(old_dir); in simple_rename()
398 drop_nlink(old_dir); in simple_rename()
402 old_dir->i_ctime = old_dir->i_mtime = new_dir->i_ctime = in simple_rename()
403 new_dir->i_mtime = inode->i_ctime = current_time(old_dir); in simple_rename()

123