/linux/fs/nfs/ |
A D | unlink.c | 261 struct inode *old_dir = data->old_dir; in nfs_async_rename_done() local 267 if (!NFS_PROTO(old_dir)->rename_done(task, old_dir, new_dir)) { in nfs_async_rename_done() 291 spin_lock(&data->old_dir->i_lock); 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() 343 .rpc_client = NFS_CLIENT(old_dir), in nfs_async_rename() 359 data->old_dir = old_dir; in nfs_async_rename() 360 ihold(old_dir); in nfs_async_rename() 370 data->args.old_dir = NFS_FH(old_dir); in nfs_async_rename() [all …]
|
A D | nfstrace.h | 680 const struct inode *old_dir, 690 __field(u64, old_dir) 697 __entry->dev = old_dir->i_sb->s_dev; 698 __entry->old_dir = NFS_FILEID(old_dir); 707 (unsigned long long)__entry->old_dir, 717 const struct inode *old_dir, \ 726 const struct inode *old_dir, 738 __field(u64, old_dir) 745 __entry->dev = old_dir->i_sb->s_dev; 747 __entry->old_dir = NFS_FILEID(old_dir); [all …]
|
/linux/fs/fat/ |
A D | namei_msdos.c | 473 if (IS_DIRSYNC(old_dir)) { in do_msdos_rename() 482 inode_inc_iversion(old_dir); in do_msdos_rename() 484 if (IS_DIRSYNC(old_dir)) in do_msdos_rename() 485 (void)fat_sync_inode(old_dir); in do_msdos_rename() 487 mark_inode_dirty(old_dir); in do_msdos_rename() 533 drop_nlink(old_dir); in do_msdos_rename() 542 inode_inc_iversion(old_dir); in do_msdos_rename() 544 if (IS_DIRSYNC(old_dir)) in do_msdos_rename() 545 (void)fat_sync_inode(old_dir); in do_msdos_rename() 547 mark_inode_dirty(old_dir); in do_msdos_rename() [all …]
|
A D | namei_vfat.c | 907 struct super_block *sb = old_dir->i_sb; in vfat_rename() 916 err = vfat_find(old_dir, &old_dentry->d_name, &old_sinfo); in vfat_rename() 921 update_dotdot = (is_dir && old_dir != new_dir); in vfat_rename() 929 ts = current_time(old_dir); in vfat_rename() 964 drop_nlink(old_dir); in vfat_rename() 973 inode_inc_iversion(old_dir); in vfat_rename() 974 fat_truncate_time(old_dir, &ts, S_CTIME|S_MTIME); in vfat_rename() 975 if (IS_DIRSYNC(old_dir)) in vfat_rename() 976 (void)fat_sync_inode(old_dir); in vfat_rename() 978 mark_inode_dirty(old_dir); in vfat_rename() [all …]
|
/linux/fs/ubifs/ |
A D | dir.c | 1366 drop_nlink(old_dir); in do_rename() 1380 drop_nlink(old_dir); in do_rename() 1385 ubifs_inode(old_dir)->ui_size = old_dir->i_size; in do_rename() 1386 old_dir->i_mtime = old_dir->i_ctime = time; in do_rename() 1474 ubifs_inode(old_dir)->ui_size = old_dir->i_size; in do_rename() 1477 inc_nlink(old_dir); in do_rename() 1482 inc_nlink(old_dir); in do_rename() 1528 old_dir->i_mtime = old_dir->i_ctime = time; in ubifs_xrename() 1531 if (old_dir != new_dir) { in ubifs_xrename() 1534 drop_nlink(old_dir); in ubifs_xrename() [all …]
|
/linux/fs/affs/ |
A D | namei.c | 408 struct super_block *sb = old_dir->i_sb; in affs_rename() 431 affs_lock_dir(old_dir); in affs_rename() 432 retval = affs_remove_hash(old_dir, bh); in affs_rename() 433 affs_unlock_dir(old_dir); in affs_rename() 456 struct super_block *sb = old_dir->i_sb; in affs_xrename() 472 affs_lock_dir(old_dir); in affs_xrename() 473 retval = affs_remove_hash(old_dir, bh_old); in affs_xrename() 474 affs_unlock_dir(old_dir); in affs_xrename() 495 affs_lock_dir(old_dir); in affs_xrename() 497 affs_unlock_dir(old_dir); in affs_xrename() [all …]
|
/linux/fs/f2fs/ |
A D | namei.c | 956 if (old_dir == new_dir && !new_inode) { in f2fs_rename() 968 err = f2fs_dquot_initialize(old_dir); in f2fs_rename() 1079 if (old_dir != new_dir && !whiteout) in f2fs_rename() 1084 f2fs_i_links_write(old_dir, false); in f2fs_rename() 1137 !projid_eq(F2FS_I(old_dir)->i_projid, in f2fs_cross_rename() 1141 err = f2fs_dquot_initialize(old_dir); in f2fs_cross_rename() 1165 if (old_dir != new_dir) { in f2fs_cross_rename() 1225 old_dir->i_ctime = current_time(old_dir); in f2fs_cross_rename() 1227 down_write(&F2FS_I(old_dir)->i_sem); in f2fs_cross_rename() 1229 up_write(&F2FS_I(old_dir)->i_sem); in f2fs_cross_rename() [all …]
|
/linux/fs/reiserfs/ |
A D | namei.c | 1345 retval = dquot_initialize(old_dir); in reiserfs_rename() 1360 reiserfs_write_lock(old_dir->i_sb); 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() 1413 reiserfs_write_unlock(old_dir->i_sb); in reiserfs_rename() 1545 old_dir)) { in reiserfs_rename() 1577 ctime = current_time(old_dir); in reiserfs_rename() 1578 old_dir->i_ctime = old_dir->i_mtime = ctime; in reiserfs_rename() 1610 DEC_DIR_INODE_NLINK(old_dir); in reiserfs_rename() 1632 reiserfs_update_sd(&th, old_dir); in reiserfs_rename() [all …]
|
/linux/fs/jfs/ |
A D | namei.c | 1088 rc = dquot_initialize(old_dir); in jfs_rename() 1158 if (old_dir != new_dir) in jfs_rename() 1178 if (old_dir != new_dir) in jfs_rename() 1241 drop_nlink(old_dir); in jfs_rename() 1242 if (old_dir != new_dir) { in jfs_rename() 1277 iplist[ipcount++] = old_dir; in jfs_rename() 1279 if (old_dir != new_dir) { in jfs_rename() 1281 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in jfs_rename() 1282 mark_inode_dirty(old_dir); in jfs_rename() 1301 if (old_dir != new_dir) in jfs_rename() [all …]
|
/linux/fs/debugfs/ |
A D | inode.c | 756 struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, in debugfs_rename() argument 763 if (IS_ERR(old_dir)) in debugfs_rename() 764 return old_dir; in debugfs_rename() 770 trap = lock_rename(new_dir, old_dir); in debugfs_rename() 772 if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) in debugfs_rename() 785 error = simple_rename(&init_user_ns, d_inode(old_dir), old_dentry, in debugfs_rename() 792 fsnotify_move(d_inode(old_dir), d_inode(new_dir), &old_name.name, in debugfs_rename() 796 unlock_rename(new_dir, old_dir); in debugfs_rename() 802 unlock_rename(new_dir, old_dir); in debugfs_rename()
|
/linux/fs/ocfs2/ |
A D | namei.c | 830 ocfs2_double_unlock(old_dir, dir); in ocfs2_link() 1201 struct inode *old_dir, in ocfs2_rename() argument 1221 u32 old_dir_nlink = old_dir->i_nlink; in ocfs2_rename() 1240 status = dquot_initialize(old_dir); in ocfs2_rename() 1251 osb = OCFS2_SB(old_dir->i_sb); in ocfs2_rename() 1565 old_dentry->d_name.len, old_dir, in ocfs2_rename() 1593 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in ocfs2_rename() 1598 drop_nlink(old_dir); in ocfs2_rename() 1606 mark_inode_dirty(old_dir); in ocfs2_rename() 1613 if (old_dir != new_dir) { in ocfs2_rename() [all …]
|
A D | dcache.c | 441 struct inode *old_dir, struct inode *new_dir) in ocfs2_dentry_move() argument 444 struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); in ocfs2_dentry_move() 453 if (old_dir == new_dir) in ocfs2_dentry_move()
|
/linux/fs/hpfs/ |
A D | namei.c | 514 static int hpfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir, 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() 614 hpfs_update_directory_times(old_dir); in hpfs_rename()
|
/linux/fs/bfs/ |
A D | dir.c | 202 static int bfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir, 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()
|
/linux/fs/ufs/ |
A D | namei.c | 246 static int ufs_rename(struct user_namespace *mnt_userns, struct inode *old_dir, in ufs_rename() argument 261 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); in ufs_rename() 303 ufs_delete_entry(old_dir, old_de, old_page); in ufs_rename() 307 if (old_dir != new_dir) in ufs_rename() 313 inode_dec_link_count(old_dir); in ufs_rename()
|
/linux/fs/ |
A D | libfs.c | 457 if (old_dir != new_dir && old_is_dir != new_is_dir) { in simple_rename_exchange() 459 drop_nlink(old_dir); in simple_rename_exchange() 463 inc_nlink(old_dir); in simple_rename_exchange() 466 old_dir->i_ctime = old_dir->i_mtime = in simple_rename_exchange() 469 d_inode(new_dentry)->i_ctime = current_time(old_dir); in simple_rename_exchange() 475 int simple_rename(struct user_namespace *mnt_userns, struct inode *old_dir, in simple_rename() argument 486 return simple_rename_exchange(old_dir, old_dentry, new_dir, new_dentry); in simple_rename() 495 drop_nlink(old_dir); in simple_rename() 498 drop_nlink(old_dir); in simple_rename() 502 old_dir->i_ctime = old_dir->i_mtime = new_dir->i_ctime = in simple_rename() [all …]
|
/linux/fs/nilfs2/ |
A D | namei.c | 344 struct inode *old_dir, struct dentry *old_dentry, in nilfs_rename() argument 360 err = nilfs_transaction_begin(old_dir->i_sb, &ti, 1); in nilfs_rename() 365 old_de = nilfs_find_entry(old_dir, &old_dentry->d_name, &old_page); in nilfs_rename() 415 drop_nlink(old_dir); in nilfs_rename() 417 nilfs_mark_inode_dirty(old_dir); in nilfs_rename() 420 err = nilfs_transaction_commit(old_dir->i_sb); in nilfs_rename() 432 nilfs_transaction_abort(old_dir->i_sb); in nilfs_rename()
|
/linux/fs/crypto/ |
A D | hooks.c | 71 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, in __fscrypt_prepare_rename() argument 83 if (old_dir != new_dir) { in __fscrypt_prepare_rename() 90 IS_ENCRYPTED(old_dir) && in __fscrypt_prepare_rename() 91 !fscrypt_has_permitted_context(old_dir, in __fscrypt_prepare_rename()
|
/linux/fs/ext2/ |
A D | namei.c | 325 struct inode * old_dir, struct dentry * old_dentry, in ext2_rename() argument 342 err = dquot_initialize(old_dir); in ext2_rename() 350 old_de = ext2_find_entry(old_dir, &old_dentry->d_name, &old_page, in ext2_rename() 403 if (old_dir != new_dir) in ext2_rename() 408 inode_dec_link_count(old_dir); in ext2_rename()
|
/linux/fs/exfat/ |
A D | namei.c | 1330 struct inode *old_dir, struct dentry *old_dentry, in exfat_rename() argument 1335 struct super_block *sb = old_dir->i_sb; in exfat_rename() 1351 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename() 1373 if (S_ISDIR(old_inode->i_mode) && old_dir != new_dir) { in exfat_rename() 1374 drop_nlink(old_dir); in exfat_rename() 1379 inode_inc_iversion(old_dir); in exfat_rename() 1380 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in exfat_rename() 1381 if (IS_DIRSYNC(old_dir)) in exfat_rename() 1382 exfat_sync_inode(old_dir); in exfat_rename() 1384 mark_inode_dirty(old_dir); in exfat_rename()
|
/linux/fs/coda/ |
A D | dir.c | 298 static int coda_rename(struct user_namespace *mnt_userns, struct inode *old_dir, in coda_rename() argument 311 error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), in coda_rename() 317 coda_dir_drop_nlink(old_dir); in coda_rename() 322 coda_dir_update_mtime(old_dir); in coda_rename()
|
/linux/include/linux/ |
A D | fsnotify.h | 138 static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, in fsnotify_move() argument 149 if (old_dir == new_dir) in fsnotify_move() 158 old_dir, old_name, fs_cookie); in fsnotify_move()
|
A D | fscrypt.h | 337 int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, 620 static inline int __fscrypt_prepare_rename(struct inode *old_dir, in __fscrypt_prepare_rename() argument 840 static inline int fscrypt_prepare_rename(struct inode *old_dir, in fscrypt_prepare_rename() argument 846 if (IS_ENCRYPTED(old_dir) || IS_ENCRYPTED(new_dir)) in fscrypt_prepare_rename() 847 return __fscrypt_prepare_rename(old_dir, old_dentry, in fscrypt_prepare_rename()
|
/linux/fs/udf/ |
A D | namei.c | 1076 static int udf_rename(struct user_namespace *mnt_userns, struct inode *old_dir, in udf_rename() argument 1093 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename() 1104 if (!ofi || udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) in udf_rename() 1146 old_dir->i_ino) in udf_rename() 1172 ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); in udf_rename() 1173 udf_delete_entry(old_dir, ofi, &ofibh, &ocfi); in udf_rename() 1179 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); in udf_rename() 1181 mark_inode_dirty(old_dir); in udf_rename() 1192 inode_dec_link_count(old_dir); in udf_rename()
|
/linux/fs/hfs/ |
A D | dir.c | 283 static int hfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir, in hfs_rename() argument 300 old_dir, &old_dentry->d_name, in hfs_rename() 303 hfs_cat_build_key(old_dir->i_sb, in hfs_rename()
|