/fs/nfs/ |
D | unlink.c | 261 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 …]
|
D | nfstrace.h | 743 const struct inode *old_dir, 749 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry), 753 __field(u64, old_dir) 760 __entry->dev = old_dir->i_sb->s_dev; 761 __entry->old_dir = NFS_FILEID(old_dir); 770 (unsigned long long)__entry->old_dir, 780 const struct inode *old_dir, \ 785 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry)) 789 const struct inode *old_dir, 796 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error), [all …]
|
/fs/affs/ |
D | namei.c | 402 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() 469 affs_lock_dir(old_dir); in affs_xrename() 470 retval = affs_remove_hash(old_dir, bh_old); in affs_xrename() [all …]
|
/fs/ubifs/ |
D | dir.c | 1258 static int do_rename(struct inode *old_dir, struct dentry *old_dentry, in do_rename() argument 1262 struct ubifs_info *c = old_dir->i_sb->s_fs_info; in do_rename() 1268 int err, release, sync = 0, move = (new_dir != old_dir); in do_rename() 1289 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename() 1308 err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &old_nm); in do_rename() 1345 err = do_tmpfile(old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE, &whiteout); in do_rename() 1378 lock_4_inodes(old_dir, new_dir, new_inode, whiteout); in do_rename() 1384 time = current_time(old_dir); in do_rename() 1394 drop_nlink(old_dir); in do_rename() 1408 drop_nlink(old_dir); in do_rename() [all …]
|
D | journal.c | 1214 int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir, in ubifs_jnl_rename() argument 1228 int move = (old_dir != new_dir); in ubifs_jnl_rename() 1236 ubifs_assert(c, ubifs_inode(old_dir)->data_len == 0); in ubifs_jnl_rename() 1238 ubifs_assert(c, mutex_is_locked(&ubifs_inode(old_dir)->ui_mutex)); in ubifs_jnl_rename() 1286 dent_key_init_flash(c, &dent2->key, old_dir->i_ino, old_nm); in ubifs_jnl_rename() 1317 pack_inode(c, p, old_dir, 1); in ubifs_jnl_rename() 1322 pack_inode(c, p, old_dir, 0); in ubifs_jnl_rename() 1351 ubifs_wbuf_add_ino_nolock(wbuf, old_dir->i_ino); in ubifs_jnl_rename() 1367 dent_key_init(c, &key, old_dir->i_ino, old_nm); in ubifs_jnl_rename() 1378 dent_key_init(c, &key, old_dir->i_ino, old_nm); in ubifs_jnl_rename() [all …]
|
/fs/fat/ |
D | namei_msdos.c | 427 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 …]
|
D | namei_vfat.c | 895 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/ |
D | namei.c | 927 static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, in f2fs_rename() argument 931 struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir); in f2fs_rename() 960 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 961 err = f2fs_try_convert_inline_dir(old_dir, new_dentry); in f2fs_rename() 967 err = f2fs_create_whiteout(old_dir, &whiteout); in f2fs_rename() 972 err = f2fs_dquot_initialize(old_dir); in f2fs_rename() 987 old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); in f2fs_rename() 1066 f2fs_delete_entry(old_entry, old_page, old_dir, NULL); in f2fs_rename() 1083 if (old_dir != new_dir) in f2fs_rename() 1088 f2fs_i_links_write(old_dir, false); in f2fs_rename() [all …]
|
/fs/reiserfs/ |
D | namei.c | 1311 static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry, in reiserfs_rename() argument 1343 4 * REISERFS_QUOTA_TRANS_BLOCKS(old_dir->i_sb); in reiserfs_rename() 1345 retval = dquot_initialize(old_dir); in reiserfs_rename() 1360 reiserfs_write_lock(old_dir->i_sb); in reiserfs_rename() 1362 reiserfs_find_entry(old_dir, old_dentry->d_name.name, in reiserfs_rename() 1367 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1372 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1385 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1400 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1405 if (dot_dot_de.de_objectid != old_dir->i_ino) { in reiserfs_rename() [all …]
|
/fs/jfs/ |
D | namei.c | 1066 static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, in jfs_rename() argument 1092 rc = dquot_initialize(old_dir); in jfs_rename() 1111 rc = dtSearch(old_dir, &old_dname, &ino, &btstack, JFS_LOOKUP); in jfs_rename() 1162 if (old_dir != new_dir) in jfs_rename() 1163 mutex_lock_nested(&JFS_IP(old_dir)->commit_mutex, in jfs_rename() 1182 if (old_dir != new_dir) in jfs_rename() 1183 mutex_unlock(&JFS_IP(old_dir)->commit_mutex); in jfs_rename() 1237 rc = dtDelete(tid, old_dir, &old_dname, &ino, JFS_REMOVE); in jfs_rename() 1245 drop_nlink(old_dir); in jfs_rename() 1246 if (old_dir != new_dir) { in jfs_rename() [all …]
|
/fs/ocfs2/ |
D | namei.c | 683 struct inode *old_dir = d_inode(old_dentry->d_parent); in ocfs2_link() local 707 err = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_link() 733 err = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_link() 826 ocfs2_double_unlock(old_dir, dir); in ocfs2_link() 1196 static int ocfs2_rename(struct inode *old_dir, in ocfs2_rename() argument 1216 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename() 1231 trace_ocfs2_rename(old_dir, old_dentry, new_dir, new_dentry, in ocfs2_rename() 1235 status = dquot_initialize(old_dir); in ocfs2_rename() 1246 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename() 1264 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename() [all …]
|
D | dcache.c | 443 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/bfs/ |
D | dir.c | 202 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/hpfs/ |
D | namei.c | 510 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/ |
D | inode.c | 787 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument 794 if (IS_ERR(old_dir)) in debugfs_rename() 795 return old_dir; in debugfs_rename() 801 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 803 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 816 error = simple_rename(d_inode(old_dir), old_dentry, d_inode(new_dir), in debugfs_rename() 823 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 827 unlock_rename(new_dir, old_dir); in debugfs_rename() 833 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/fs/ufs/ |
D | namei.c | 243 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/ |
D | namei.c | 341 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/crypto/ |
D | hooks.c | 69 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument 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()
|
/fs/coda/ |
D | dir.c | 294 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/ext2/ |
D | namei.c | 318 static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument 333 err = dquot_initialize(old_dir); in ext2_rename() 341 old_de = ext2_find_entry(old_dir, &old_dentry->d_name, &old_page); in ext2_rename() 390 if (old_dir != new_dir) in ext2_rename() 396 inode_dec_link_count(old_dir); in ext2_rename()
|
/fs/exfat/ |
D | namei.c | 1343 static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry, in exfat_rename() argument 1348 struct super_block *sb = old_dir->i_sb; in exfat_rename() 1364 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename() 1386 if (S_ISDIR(old_inode->i_mode) && old_dir != new_dir) { in exfat_rename() 1387 drop_nlink(old_dir); in exfat_rename() 1392 inode_inc_iversion(old_dir); in exfat_rename() 1393 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in exfat_rename() 1394 if (IS_DIRSYNC(old_dir)) in exfat_rename() 1395 exfat_sync_inode(old_dir); in exfat_rename() 1397 mark_inode_dirty(old_dir); in exfat_rename()
|
/fs/udf/ |
D | namei.c | 1075 static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, in udf_rename() argument 1092 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename() 1104 if (udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) != old_inode->i_ino) in udf_rename() 1145 old_dir->i_ino) in udf_rename() 1171 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename() 1172 udf_delete_entry(old_dir, ofi, &ofibh, &ocfi); in udf_rename() 1178 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in udf_rename() 1180 mark_inode_dirty(old_dir); in udf_rename() 1191 inode_dec_link_count(old_dir); in udf_rename()
|
/fs/hfs/ |
D | dir.c | 282 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/ |
D | dir.c | 1195 static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, in ceph_rename() argument 1199 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() 1207 if (ceph_snap(old_dir) != ceph_snap(new_dir)) in ceph_rename() 1209 if (ceph_snap(old_dir) != CEPH_NOSNAP) { in ceph_rename() 1210 if (old_dir == new_dir && ceph_snap(old_dir) == CEPH_SNAPDIR) in ceph_rename() 1214 } else if (old_dir != new_dir) { in ceph_rename() 1222 old_dir, old_dentry, new_dir, new_dentry); in ceph_rename() 1226 ihold(old_dir); in ceph_rename() 1230 req->r_old_dentry_dir = old_dir; in ceph_rename() 1243 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
|
/fs/minix/ |
D | namei.c | 184 static int minix_rename(struct inode * old_dir, struct dentry *old_dentry, in minix_rename() argument 240 inode_dec_link_count(old_dir); in minix_rename()
|