Home
last modified time | relevance | path

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

12

/fs/fat/
Dnamei_msdos.c445 static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, in do_msdos_rename() argument
462 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename()
469 update_dotdot = (is_dir && old_dir != new_dir); in do_msdos_rename()
491 if (IS_DIRSYNC(old_dir)) { in do_msdos_rename()
500 old_dir->i_version++; in do_msdos_rename()
501 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; in do_msdos_rename()
502 if (IS_DIRSYNC(old_dir)) in do_msdos_rename()
503 (void)fat_sync_inode(old_dir); in do_msdos_rename()
505 mark_inode_dirty(old_dir); in do_msdos_rename()
553 drop_nlink(old_dir); in do_msdos_rename()
[all …]
Dnamei_vfat.c907 static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry, in vfat_rename() argument
917 struct super_block *sb = old_dir->i_sb; in vfat_rename()
923 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename()
928 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename()
974 drop_nlink(old_dir); in vfat_rename()
979 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in vfat_rename()
983 old_dir->i_version++; in vfat_rename()
984 old_dir->i_ctime = old_dir->i_mtime = ts; in vfat_rename()
985 if (IS_DIRSYNC(old_dir)) in vfat_rename()
986 (void)fat_sync_inode(old_dir); in vfat_rename()
[all …]
/fs/reiserfs/
Dnamei.c1226 static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, in reiserfs_rename() argument
1252 4 * REISERFS_QUOTA_TRANS_BLOCKS(old_dir->i_sb); in reiserfs_rename()
1260 reiserfs_write_lock(old_dir->i_sb); in reiserfs_rename()
1262 reiserfs_find_entry(old_dir, old_dentry->d_name.name, in reiserfs_rename()
1267 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1272 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1284 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1298 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
1303 if (dot_dot_de.de_objectid != old_dir->i_ino) { in reiserfs_rename()
1304 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename()
[all …]
/fs/ubifs/
Ddir.c967 static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, in ubifs_rename() argument
970 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in ubifs_rename()
974 int err, release, sync = 0, move = (new_dir != old_dir); in ubifs_rename()
996 old_inode->i_ino, old_dir->i_ino, new_dentry->d_name.len, in ubifs_rename()
998 ubifs_assert(mutex_is_locked(&old_dir->i_mutex)); in ubifs_rename()
1019 lock_3_inodes(old_dir, new_dir, new_inode); in ubifs_rename()
1025 time = ubifs_current_time(old_dir); in ubifs_rename()
1035 drop_nlink(old_dir); in ubifs_rename()
1049 drop_nlink(old_dir); in ubifs_rename()
1053 old_dir->i_size -= old_sz; in ubifs_rename()
[all …]
Djournal.c898 int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir, in ubifs_jnl_rename() argument
911 int move = (old_dir != new_dir); in ubifs_jnl_rename()
916 old_dir->i_ino, new_dentry->d_name.len, in ubifs_jnl_rename()
918 ubifs_assert(ubifs_inode(old_dir)->data_len == 0); in ubifs_jnl_rename()
920 ubifs_assert(mutex_is_locked(&ubifs_inode(old_dir)->ui_mutex)); in ubifs_jnl_rename()
937 if (old_dir != new_dir) in ubifs_jnl_rename()
962 dent_key_init_flash(c, &dent2->key, old_dir->i_ino, in ubifs_jnl_rename()
979 pack_inode(c, p, old_dir, 1); in ubifs_jnl_rename()
981 pack_inode(c, p, old_dir, 0); in ubifs_jnl_rename()
1002 ubifs_wbuf_add_ino_nolock(wbuf, old_dir->i_ino); in ubifs_jnl_rename()
[all …]
/fs/jfs/
Dnamei.c1066 static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, in jfs_rename() argument
1102 rc = dtSearch(old_dir, &old_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename()
1131 } else if ((new_dir != old_dir) && in jfs_rename()
1155 if (old_dir != new_dir) in jfs_rename()
1156 mutex_lock_nested(&JFS_IP(old_dir)->commit_mutex, in jfs_rename()
1175 if (old_dir != new_dir) in jfs_rename()
1176 mutex_unlock(&JFS_IP(old_dir)->commit_mutex); in jfs_rename()
1230 rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); in jfs_rename()
1238 drop_nlink(old_dir); in jfs_rename()
1239 if (old_dir != new_dir) { in jfs_rename()
[all …]
/fs/hpfs/
Dnamei.c545 static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, in hpfs_rename() argument
571 mutex_lock(&hpfs_i(old_dir)->i_mutex); in hpfs_rename()
572 if (new_dir != old_dir) in hpfs_rename()
581 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, (char *)old_name, old_len, &dno, &qbh))) { in hpfs_rename()
591 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) { in hpfs_rename()
608 if (new_dir == old_dir) hpfs_brelse4(&qbh); in hpfs_rename()
615 if (new_dir != old_dir) hpfs_brelse4(&qbh); in hpfs_rename()
619 if (new_dir == old_dir) in hpfs_rename()
620 if (!(dep = map_dirent(old_dir, hpfs_i(old_dir)->i_dno, (char *)old_name, old_len, &dno, &qbh))) { in hpfs_rename()
627 if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 0))) { in hpfs_rename()
[all …]
/fs/ocfs2/
Dnamei.c1002 static int ocfs2_rename(struct inode *old_dir, in ocfs2_rename() argument
1028 nlink_t old_dir_nlink = old_dir->i_nlink; in ocfs2_rename()
1035 old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename()
1039 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename()
1057 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
1067 status = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_rename()
1119 if (old_inode_parent != OCFS2_I(old_dir)->ip_blkno) { in ocfs2_rename()
1124 if (!new_inode && new_dir != old_dir && in ocfs2_rename()
1131 status = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_rename()
1339 old_dir, &old_de); in ocfs2_rename()
[all …]
Ddcache.c432 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument
435 struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); in ocfs2_dentry_move()
444 if (old_dir == new_dir) in ocfs2_dentry_move()
Ddcache.h61 struct inode *old_dir, struct inode *new_dir);
/fs/debugfs/
Dinode.c455 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument
462 trap = lock_rename(new_dir, old_dir); in debugfs_rename()
464 if (!old_dir->d_inode || !new_dir->d_inode) in debugfs_rename()
477 error = simple_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, in debugfs_rename()
484 fsnotify_move(old_dir->d_inode, new_dir->d_inode, old_name, in debugfs_rename()
488 unlock_rename(new_dir, old_dir); in debugfs_rename()
494 unlock_rename(new_dir, old_dir); in debugfs_rename()
/fs/affs/
Dnamei.c397 affs_rename(struct inode *old_dir, struct dentry *old_dentry, in affs_rename() argument
400 struct super_block *sb = old_dir->i_sb; in affs_rename()
405 (u32)old_dir->i_ino, (int)old_dentry->d_name.len, old_dentry->d_name.name, in affs_rename()
424 affs_lock_dir(old_dir); in affs_rename()
425 retval = affs_remove_hash(old_dir, bh); in affs_rename()
426 affs_unlock_dir(old_dir); in affs_rename()
439 mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir); in affs_rename()
/fs/
Dnamei.c2512 static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry, in vfs_rename_dir() argument
2522 if (new_dir != old_dir) { in vfs_rename_dir()
2528 error = security_inode_rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_dir()
2540 error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_dir()
2550 if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE)) in vfs_rename_dir()
2555 static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry, in vfs_rename_other() argument
2561 error = security_inode_rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_other()
2572 error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); in vfs_rename_other()
2574 if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE)) in vfs_rename_other()
2583 int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, in vfs_rename() argument
[all …]
Dlibfs.c306 int simple_rename(struct inode *old_dir, struct dentry *old_dentry, in simple_rename() argument
318 drop_nlink(old_dir); in simple_rename()
320 drop_nlink(old_dir); in simple_rename()
324 old_dir->i_ctime = old_dir->i_mtime = new_dir->i_ctime = in simple_rename()
/fs/bfs/
Ddir.c221 static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry, in bfs_rename() argument
238 old_bh = bfs_find_entry(old_dir, in bfs_rename()
264 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC; in bfs_rename()
265 mark_inode_dirty(old_dir); in bfs_rename()
/fs/ufs/
Dnamei.c273 static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, in ufs_rename() argument
284 old_de = ufs_find_entry(old_dir, old_dentry, &old_page); in ufs_rename()
336 ufs_delete_entry(old_dir, old_de, old_page); in ufs_rename()
341 inode_dec_link_count(old_dir); in ufs_rename()
/fs/ext4/
Dnamei.c2307 static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, in ext4_rename() argument
2322 handle = ext4_journal_start(old_dir, 2 * in ext4_rename()
2323 EXT4_DATA_TRANS_BLOCKS(old_dir->i_sb) + in ext4_rename()
2328 if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir)) in ext4_rename()
2331 old_bh = ext4_find_entry(old_dir, &old_dentry->d_name, &old_de); in ext4_rename()
2361 if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) in ext4_rename()
2364 if (!new_inode && new_dir != old_dir && in ext4_rename()
2402 (retval = ext4_delete_entry(handle, old_dir, in ext4_rename()
2411 old_bh2 = ext4_find_entry(old_dir, &old_dentry->d_name, &old_de2); in ext4_rename()
2413 retval = ext4_delete_entry(handle, old_dir, in ext4_rename()
[all …]
/fs/coda/
Ddir.c396 static int coda_rename(struct inode *old_dir, struct dentry *old_dentry, in coda_rename() argument
407 error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), in coda_rename()
414 coda_dir_drop_nlink(old_dir); in coda_rename()
417 coda_dir_update_mtime(old_dir); in coda_rename()
421 coda_flag_inode(old_dir, C_VATTR); in coda_rename()
/fs/minix/
Dnamei.c188 static int minix_rename(struct inode * old_dir, struct dentry *old_dentry, in minix_rename() argument
191 struct minix_sb_info * info = minix_sb(old_dir->i_sb); in minix_rename()
250 inode_dec_link_count(old_dir); in minix_rename()
/fs/ext3/
Dnamei.c2261 static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, in ext3_rename() argument
2276 handle = ext3_journal_start(old_dir, 2 * in ext3_rename()
2277 EXT3_DATA_TRANS_BLOCKS(old_dir->i_sb) + in ext3_rename()
2282 if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir)) in ext3_rename()
2285 old_bh = ext3_find_entry(old_dir, &old_dentry->d_name, &old_de); in ext3_rename()
2315 if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) in ext3_rename()
2318 if (!new_inode && new_dir!=old_dir && in ext3_rename()
2355 (retval = ext3_delete_entry(handle, old_dir, in ext3_rename()
2364 old_bh2 = ext3_find_entry(old_dir, &old_dentry->d_name, in ext3_rename()
2367 retval = ext3_delete_entry(handle, old_dir, in ext3_rename()
[all …]
/fs/hfs/
Ddir.c294 static int hfs_rename(struct inode *old_dir, struct dentry *old_dentry, in hfs_rename() argument
307 old_dir, &old_dentry->d_name, in hfs_rename()
310 hfs_cat_build_key(old_dir->i_sb, in hfs_rename()
/fs/ncpfs/
Dncplib_kernel.c893 struct inode *old_dir, char *old_name, __le16 old_type, in ncp_RenameNSEntry() argument
898 if ((old_dir == NULL) || (old_name == NULL) || in ncp_RenameNSEntry()
904 ncp_add_byte(server, server->name_space[NCP_FINFO(old_dir)->volNumber]); in ncp_RenameNSEntry()
909 ncp_add_byte(server, NCP_FINFO(old_dir)->volNumber); in ncp_RenameNSEntry()
910 ncp_add_dword(server, NCP_FINFO(old_dir)->dirEntNum); in ncp_RenameNSEntry()
932 struct inode *old_dir, char *old_name, in ncp_ren_or_mov_file_or_subdir() argument
939 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, in ncp_ren_or_mov_file_or_subdir()
944 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, in ncp_ren_or_mov_file_or_subdir()
950 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, in ncp_ren_or_mov_file_or_subdir()
Ddir.c210 ncp_force_rename(struct inode *old_dir, struct dentry* old_dentry, char *_old_name, in ncp_force_rename() argument
239 res = ncp_ren_or_mov_file_or_subdir(NCP_SERVER(old_dir), in ncp_force_rename()
240 old_dir, _old_name, in ncp_force_rename()
1109 static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry, in ncp_rename() argument
1112 struct ncp_server *server = NCP_SERVER(old_dir); in ncp_rename()
1132 !ncp_preserve_case(old_dir)); in ncp_rename()
1143 error = ncp_ren_or_mov_file_or_subdir(server, old_dir, __old_name, in ncp_rename()
1148 error = ncp_force_rename(old_dir, old_dentry, __old_name, in ncp_rename()
/fs/udf/
Dnamei.c1101 static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, in udf_rename() argument
1115 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1122 if (!ofi || udf_get_lb_pblock(old_dir->i_sb, tloc, 0) in udf_rename()
1162 old_dir->i_ino) in udf_rename()
1194 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename()
1195 udf_delete_entry(old_dir, ofi, &ofibh, &ocfi); in udf_rename()
1201 old_dir->i_ctime = old_dir->i_mtime = current_fs_time(old_dir->i_sb); in udf_rename()
1202 mark_inode_dirty(old_dir); in udf_rename()
1214 inode_dec_link_count(old_dir); in udf_rename()
/fs/ext2/
Dnamei.c288 static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument
299 old_de = ext2_find_entry (old_dir, &old_dentry->d_name, &old_page); in ext2_rename()
356 inode_dec_link_count(old_dir); in ext2_rename()

12