Home
last modified time | relevance | path

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

123

/fs/fat/
Dnamei_msdos.c433 static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, in do_msdos_rename() argument
450 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename()
457 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename()
478 if (IS_DIRSYNC(old_dir)) { in do_msdos_rename()
487 old_dir->i_version++; in do_msdos_rename()
488 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; in do_msdos_rename()
489 if (IS_DIRSYNC(old_dir)) in do_msdos_rename()
490 (void)fat_sync_inode(old_dir); in do_msdos_rename()
492 mark_inode_dirty(old_dir); in do_msdos_rename()
538 drop_nlink(old_dir); in do_msdos_rename()
[all …]
Dnamei_vfat.c909 static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename() argument
919 struct super_block *sb = old_dir->i_sb; in vfat_rename()
925 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename()
930 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename()
973 drop_nlink(old_dir); in vfat_rename()
978 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in vfat_rename()
982 old_dir->i_version++; in vfat_rename()
983 old_dir->i_ctime = old_dir->i_mtime = ts; in vfat_rename()
984 if (IS_DIRSYNC(old_dir)) in vfat_rename()
985 (void)fat_sync_inode(old_dir); in vfat_rename()
[all …]
/fs/nfs/
Dunlink.c335 struct inode *old_dir = data->old_dir; in nfs_async_rename_done() local
339 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done()
355 struct super_block *sb = data->old_dir->i_sb; in nfs_async_rename_release()
362 iput(data->old_dir); in nfs_async_rename_release()
372 NFS_PROTO(data->old_dir)->rename_rpc_prepare(task, data); in nfs_rename_prepare()
391 nfs_async_rename(struct inode *old_dir, struct inode *new_dir, in nfs_async_rename() argument
400 .rpc_client = NFS_CLIENT(old_dir), in nfs_async_rename()
421 data->old_dir = old_dir; in nfs_async_rename()
422 ihold(old_dir); in nfs_async_rename()
431 data->args.old_dir = NFS_FH(old_dir); in nfs_async_rename()
[all …]
Dproc.c350 nfs_proc_rename_done(struct rpc_task *task, struct inode *old_dir, in nfs_proc_rename_done() argument
353 nfs_mark_for_revalidate(old_dir); in nfs_proc_rename_done()
359 nfs_proc_rename(struct inode *old_dir, struct qstr *old_name, in nfs_proc_rename() argument
363 .old_dir = NFS_FH(old_dir), in nfs_proc_rename()
375 status = rpc_call_sync(NFS_CLIENT(old_dir), &msg, 0); in nfs_proc_rename()
376 nfs_mark_for_revalidate(old_dir); in nfs_proc_rename()
Dnfs3proc.c458 nfs3_proc_rename_done(struct rpc_task *task, struct inode *old_dir, in nfs3_proc_rename_done() argument
463 if (nfs3_async_handle_jukebox(task, old_dir)) in nfs3_proc_rename_done()
467 nfs_post_op_update_inode(old_dir, res->old_fattr); in nfs3_proc_rename_done()
473 nfs3_proc_rename(struct inode *old_dir, struct qstr *old_name, in nfs3_proc_rename() argument
477 .old_dir = NFS_FH(old_dir), in nfs3_proc_rename()
497 status = rpc_call_sync(NFS_CLIENT(old_dir), &msg, 0); in nfs3_proc_rename()
498 nfs_post_op_update_inode(old_dir, res.old_fattr); in nfs3_proc_rename()
/fs/reiserfs/
Dnamei.c1212 static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, in reiserfs_rename() argument
1238 4 * REISERFS_QUOTA_TRANS_BLOCKS(old_dir->i_sb); in reiserfs_rename()
1240 dquot_initialize(old_dir); in reiserfs_rename()
1249 reiserfs_write_lock(old_dir->i_sb); in reiserfs_rename()
1251 reiserfs_find_entry(old_dir, old_dentry->d_name.name, in reiserfs_rename()
1256 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1261 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1273 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1287 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1292 if (dot_dot_de.de_objectid != old_dir->i_ino) { in reiserfs_rename()
[all …]
/fs/logfs/
Ddir.c604 static int logfs_rename_cross(struct inode *old_dir, struct dentry *old_dentry, in logfs_rename_cross() argument
607 struct logfs_super *super = logfs_super(old_dir->i_sb); in logfs_rename_cross()
614 err = logfs_get_dd(old_dir, old_dentry, &dd, &pos); in logfs_rename_cross()
623 ta->dir = old_dir->i_ino; in logfs_rename_cross()
642 logfs_add_transaction(old_dir, ta); in logfs_rename_cross()
643 err = logfs_delete_dd(old_dir, pos); in logfs_rename_cross()
645 err = write_inode(old_dir); in logfs_rename_cross()
646 LOGFS_BUG_ON(err, old_dir->i_sb); in logfs_rename_cross()
676 static int logfs_rename_target(struct inode *old_dir, struct dentry *old_dentry, in logfs_rename_target() argument
679 struct logfs_super *super = logfs_super(old_dir->i_sb); in logfs_rename_target()
[all …]
/fs/ubifs/
Ddir.c979 static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, in ubifs_rename() argument
982 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in ubifs_rename()
986 int err, release, sync = 0, move = (new_dir != old_dir); in ubifs_rename()
1009 old_inode->i_ino, old_dir->i_ino, new_dentry->d_name.len, in ubifs_rename()
1011 ubifs_assert(mutex_is_locked(&old_dir->i_mutex)); in ubifs_rename()
1032 lock_3_inodes(old_dir, new_dir, new_inode); in ubifs_rename()
1038 time = ubifs_current_time(old_dir); in ubifs_rename()
1048 drop_nlink(old_dir); in ubifs_rename()
1062 drop_nlink(old_dir); in ubifs_rename()
1066 old_dir->i_size -= old_sz; in ubifs_rename()
[all …]
Djournal.c920 int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir, in ubifs_jnl_rename() argument
933 int move = (old_dir != new_dir); in ubifs_jnl_rename()
938 old_dir->i_ino, new_dentry->d_name.len, in ubifs_jnl_rename()
940 ubifs_assert(ubifs_inode(old_dir)->data_len == 0); in ubifs_jnl_rename()
942 ubifs_assert(mutex_is_locked(&ubifs_inode(old_dir)->ui_mutex)); in ubifs_jnl_rename()
959 if (old_dir != new_dir) in ubifs_jnl_rename()
984 dent_key_init_flash(c, &dent2->key, old_dir->i_ino, in ubifs_jnl_rename()
1001 pack_inode(c, p, old_dir, 1); in ubifs_jnl_rename()
1003 pack_inode(c, p, old_dir, 0); in ubifs_jnl_rename()
1024 ubifs_wbuf_add_ino_nolock(wbuf, old_dir->i_ino); in ubifs_jnl_rename()
[all …]
/fs/jfs/
Dnamei.c1064 static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, in jfs_rename() argument
1088 dquot_initialize(old_dir); in jfs_rename()
1103 rc = dtSearch(old_dir, &old_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename()
1152 if (old_dir != new_dir) in jfs_rename()
1153 mutex_lock_nested(&JFS_IP(old_dir)->commit_mutex, in jfs_rename()
1172 if (old_dir != new_dir) in jfs_rename()
1173 mutex_unlock(&JFS_IP(old_dir)->commit_mutex); in jfs_rename()
1227 rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); in jfs_rename()
1235 drop_nlink(old_dir); in jfs_rename()
1236 if (old_dir != new_dir) { in jfs_rename()
[all …]
/fs/ocfs2/
Dnamei.c1037 static int ocfs2_rename(struct inode *old_dir, in ocfs2_rename() argument
1056 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename()
1067 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename()
1071 dquot_initialize(old_dir); in ocfs2_rename()
1074 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename()
1092 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
1102 status = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_rename()
1156 if (old_inode_parent != OCFS2_I(old_dir)->ip_blkno) { in ocfs2_rename()
1161 if (!new_inode && new_dir != old_dir && in ocfs2_rename()
1168 status = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_rename()
[all …]
/fs/affs/
Dnamei.c413 affs_rename(struct inode *old_dir, struct dentry *old_dentry, in affs_rename() argument
416 struct super_block *sb = old_dir->i_sb; in affs_rename()
421 (u32)old_dir->i_ino, (int)old_dentry->d_name.len, old_dentry->d_name.name, in affs_rename()
440 affs_lock_dir(old_dir); in affs_rename()
441 retval = affs_remove_hash(old_dir, bh); in affs_rename()
442 affs_unlock_dir(old_dir); in affs_rename()
455 mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir); in affs_rename()
/fs/hpfs/
Dnamei.c518 static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, in hpfs_rename() argument
549 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename()
559 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) { in hpfs_rename()
576 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename()
581 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename()
585 if (new_dir == old_dir) in hpfs_rename()
586 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, old_name, old_len, &dno, &qbh))) { in hpfs_rename()
592 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 0))) { in hpfs_rename()
602 drop_nlink(old_dir); in hpfs_rename()
/fs/nilfs2/
Dnamei.c349 static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, in nilfs_rename() argument
361 err = nilfs_transaction_begin(old_dir->i_sb, &ti, 1); in nilfs_rename()
366 old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_page); in nilfs_rename()
416 drop_nlink(old_dir); in nilfs_rename()
418 nilfs_mark_inode_dirty(old_dir); in nilfs_rename()
421 err = nilfs_transaction_commit(old_dir->i_sb); in nilfs_rename()
433 nilfs_transaction_abort(old_dir->i_sb); in nilfs_rename()
/fs/debugfs/
Dinode.c625 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument
632 trap = lock_rename(new_dir, old_dir); in debugfs_rename()
634 if (!old_dir->d_inode || !new_dir->d_inode) in debugfs_rename()
647 error = simple_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, in debugfs_rename()
654 fsnotify_move(old_dir->d_inode, new_dir->d_inode, old_name, in debugfs_rename()
658 unlock_rename(new_dir, old_dir); in debugfs_rename()
664 unlock_rename(new_dir, old_dir); in debugfs_rename()
/fs/bfs/
Ddir.c218 static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry, in bfs_rename() argument
235 old_bh = bfs_find_entry(old_dir, in bfs_rename()
261 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; in bfs_rename()
262 mark_inode_dirty(old_dir); in bfs_rename()
267 mark_buffer_dirty_inode(old_bh, old_dir); in bfs_rename()
/fs/ext2/
Dnamei.c300 static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument
311 dquot_initialize(old_dir); in ext2_rename()
314 old_de = ext2_find_entry (old_dir, &old_dentry->d_name, &old_page); in ext2_rename()
360 if (old_dir != new_dir) in ext2_rename()
366 inode_dec_link_count(old_dir); in ext2_rename()
/fs/f2fs/
Dnamei.c396 static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, in f2fs_rename() argument
399 struct super_block *sb = old_dir->i_sb; in f2fs_rename()
412 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename()
464 if (old_dir != new_dir) { in f2fs_rename()
471 drop_nlink(old_dir); in f2fs_rename()
472 update_inode_page(old_dir); in f2fs_rename()
/fs/ufs/
Dnamei.c261 static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, in ufs_rename() argument
272 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); in ufs_rename()
314 ufs_delete_entry(old_dir, old_de, old_page); in ufs_rename()
319 inode_dec_link_count(old_dir); in ufs_rename()
/fs/coda/
Ddir.c350 static int coda_rename(struct inode *old_dir, struct dentry *old_dentry, in coda_rename() argument
359 error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), in coda_rename()
365 coda_dir_drop_nlink(old_dir); in coda_rename()
368 coda_dir_update_mtime(old_dir); in coda_rename()
372 coda_flag_inode(old_dir, C_VATTR); in coda_rename()
/fs/ext3/
Dnamei.c2338 static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, in ext3_rename() argument
2347 dquot_initialize(old_dir); in ext3_rename()
2356 handle = ext3_journal_start(old_dir, 2 * in ext3_rename()
2357 EXT3_DATA_TRANS_BLOCKS(old_dir->i_sb) + in ext3_rename()
2362 if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir)) in ext3_rename()
2365 old_bh = ext3_find_entry(old_dir, &old_dentry->d_name, &old_de); in ext3_rename()
2395 if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) in ext3_rename()
2398 if (!new_inode && new_dir!=old_dir && in ext3_rename()
2439 (retval = ext3_delete_entry(handle, old_dir, in ext3_rename()
2448 old_bh2 = ext3_find_entry(old_dir, &old_dentry->d_name, in ext3_rename()
[all …]
/fs/
Dnamei.c3777 struct inode *old_dir, struct dentry *old_dentry, in vfs_rename_dir() argument
3788 if (new_dir != old_dir) { in vfs_rename_dir()
3794 error = security_inode_rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_dir()
3807 if (max_links && !target && new_dir != old_dir && in vfs_rename_dir()
3813 error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_dir()
3826 if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE)) in vfs_rename_dir()
3831 static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry, in vfs_rename_other() argument
3837 error = security_inode_rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_other()
3849 error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_other()
3855 if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE)) in vfs_rename_other()
[all …]
/fs/exofs/
Dnamei.c230 static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, in exofs_rename() argument
241 old_de = exofs_find_entry(old_dir, old_dentry, &old_page); in exofs_rename()
286 inode_dec_link_count(old_dir); in exofs_rename()
/fs/udf/
Dnamei.c1059 static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, in udf_rename() argument
1072 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1079 if (!ofi || udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) in udf_rename()
1119 old_dir->i_ino) in udf_rename()
1145 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1146 udf_delete_entry(old_dir, ofi, &ofibh, &ocfi); in udf_rename()
1152 old_dir->i_ctime = old_dir->i_mtime = current_fs_time(old_dir->i_sb); in udf_rename()
1153 mark_inode_dirty(old_dir); in udf_rename()
1165 inode_dec_link_count(old_dir); in udf_rename()
/fs/ncpfs/
Dncplib_kernel.c904 struct inode *old_dir, const char *old_name, __le16 old_type, in ncp_RenameNSEntry() argument
909 if ((old_dir == NULL) || (old_name == NULL) || in ncp_RenameNSEntry()
915 ncp_add_byte(server, server->name_space[NCP_FINFO(old_dir)->volNumber]); in ncp_RenameNSEntry()
920 ncp_add_byte(server, NCP_FINFO(old_dir)->volNumber); in ncp_RenameNSEntry()
921 ncp_add_dword(server, NCP_FINFO(old_dir)->dirEntNum); in ncp_RenameNSEntry()
943 struct inode *old_dir, const char *old_name, in ncp_ren_or_mov_file_or_subdir() argument
950 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, in ncp_ren_or_mov_file_or_subdir()
955 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, in ncp_ren_or_mov_file_or_subdir()
961 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, in ncp_ren_or_mov_file_or_subdir()

123