Lines Matching refs:old_dir

913 static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
917 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir);
940 * add a link in old_dir which can conver inline_dir.
946 if (old_dir == new_dir && !new_inode) {
947 err = f2fs_try_convert_inline_dir(old_dir, new_dentry);
953 err = f2fs_create_whiteout(old_dir, &whiteout);
958 err = dquot_initialize(old_dir);
973 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page);
1052 f2fs_delete_entry(old_entry, old_page, old_dir, NULL);
1069 if (old_dir != new_dir)
1074 f2fs_i_links_write(old_dir, false);
1085 if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir))
1105 static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
1108 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir);
1127 !projid_eq(F2FS_I(old_dir)->i_projid,
1131 err = dquot_initialize(old_dir);
1140 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page);
1155 if (old_dir != new_dir) {
1187 if ((old_nlink > 0 && old_dir->i_nlink >= F2FS_LINK_MAX) ||
1202 f2fs_set_link(new_inode, new_dir_entry, new_dir_page, old_dir);
1205 f2fs_set_link(old_dir, old_entry, old_page, new_inode);
1215 old_dir->i_ctime = current_time(old_dir);
1217 down_write(&F2FS_I(old_dir)->i_sem);
1218 f2fs_i_links_write(old_dir, old_nlink > 0);
1219 up_write(&F2FS_I(old_dir)->i_sem);
1221 f2fs_mark_inode_dirty_sync(old_dir, false);
1231 f2fs_i_pino_write(new_inode, old_dir->i_ino);
1243 f2fs_add_ino_entry(sbi, old_dir->i_ino, TRANS_DIR_INO);
1249 if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir))
1270 static int f2fs_rename2(struct inode *old_dir, struct dentry *old_dentry,
1279 err = fscrypt_prepare_rename(old_dir, old_dentry, new_dir, new_dentry,
1285 return f2fs_cross_rename(old_dir, old_dentry,
1292 return f2fs_rename(old_dir, old_dentry, new_dir, new_dentry, flags);