Home
last modified time | relevance | path

Searched refs:old_inode (Results 1 – 25 of 27) sorted by relevance

12

/linux-6.12.1/fs/fat/
Dnamei_msdos.c435 struct inode *old_inode, *new_inode; in do_msdos_rename() local
442 old_inode = d_inode(old_dentry); in do_msdos_rename()
451 is_dir = S_ISDIR(old_inode->i_mode); in do_msdos_rename()
454 if (fat_get_dotdot_entry(old_inode, &dotdot_bh, &dotdot_de)) { in do_msdos_rename()
460 old_attrs = MSDOS_I(old_inode)->i_attrs; in do_msdos_rename()
470 MSDOS_I(old_inode)->i_attrs |= ATTR_HIDDEN; in do_msdos_rename()
472 MSDOS_I(old_inode)->i_attrs &= ~ATTR_HIDDEN; in do_msdos_rename()
474 err = fat_sync_inode(old_inode); in do_msdos_rename()
476 MSDOS_I(old_inode)->i_attrs = old_attrs; in do_msdos_rename()
480 mark_inode_dirty(old_inode); in do_msdos_rename()
[all …]
Dnamei_vfat.c936 struct inode *old_inode, *new_inode; in vfat_rename() local
944 old_inode = d_inode(old_dentry); in vfat_rename()
952 err = vfat_get_dotdot_de(old_inode, &dotdot_bh, &dotdot_de); in vfat_rename()
957 is_dir = S_ISDIR(old_inode->i_mode); in vfat_rename()
976 fat_detach(old_inode); in vfat_rename()
977 fat_attach(old_inode, new_i_pos); in vfat_rename()
978 err = vfat_sync_ipos(new_dir, old_inode); in vfat_rename()
983 err = vfat_update_dotdot_de(new_dir, old_inode, dotdot_bh, in vfat_rename()
1017 corrupt |= vfat_update_dotdot_de(old_dir, old_inode, dotdot_bh, in vfat_rename()
1021 fat_detach(old_inode); in vfat_rename()
[all …]
/linux-6.12.1/fs/ufs/
Dnamei.c250 struct inode *old_inode = d_inode(old_dentry); in ufs_rename() local
265 if (S_ISDIR(old_inode->i_mode)) { in ufs_rename()
267 dir_de = ufs_dotdot(old_inode, &dir_folio); in ufs_rename()
284 ufs_set_link(new_dir, new_de, new_folio, old_inode, 1); in ufs_rename()
290 err = ufs_add_link(new_dentry, old_inode); in ufs_rename()
301 inode_set_ctime_current(old_inode); in ufs_rename()
304 mark_inode_dirty(old_inode); in ufs_rename()
308 ufs_set_link(old_inode, dir_de, dir_folio, new_dir, 0); in ufs_rename()
/linux-6.12.1/fs/f2fs/
Dnamei.c890 struct inode *old_inode = d_inode(old_dentry); in f2fs_rename() local
898 bool old_is_dir = S_ISDIR(old_inode->i_mode); in f2fs_rename()
961 old_dir_entry = f2fs_parent_dir(old_inode, &old_dir_page); in f2fs_rename()
992 f2fs_set_link(new_dir, new_entry, new_page, old_inode); in f2fs_rename()
1011 err = f2fs_add_link(new_dentry, old_inode); in f2fs_rename()
1021 f2fs_down_write(&F2FS_I(old_inode)->i_sem); in f2fs_rename()
1023 file_lost_pino(old_inode); in f2fs_rename()
1026 f2fs_i_pino_write(old_inode, new_dir->i_ino); in f2fs_rename()
1027 f2fs_up_write(&F2FS_I(old_inode)->i_sem); in f2fs_rename()
1029 inode_set_ctime_current(old_inode); in f2fs_rename()
[all …]
/linux-6.12.1/fs/sysv/
Dnamei.c195 struct inode * old_inode = d_inode(old_dentry); in sysv_rename() local
210 if (S_ISDIR(old_inode->i_mode)) { in sysv_rename()
212 dir_de = sysv_dotdot(old_inode, &dir_folio); in sysv_rename()
229 err = sysv_set_link(new_de, new_folio, old_inode); in sysv_rename()
238 err = sysv_add_link(new_dentry, old_inode); in sysv_rename()
249 mark_inode_dirty(old_inode); in sysv_rename()
/linux-6.12.1/fs/ext2/
Dnamei.c322 struct inode * old_inode = d_inode(old_dentry); in ext2_rename() local
328 bool old_is_dir = S_ISDIR(old_inode->i_mode); in ext2_rename()
348 dir_de = ext2_dotdot(old_inode, &dir_folio); in ext2_rename()
367 err = ext2_set_link(new_dir, new_de, new_folio, old_inode, true); in ext2_rename()
376 err = ext2_add_link(new_dentry, old_inode); in ext2_rename()
387 inode_set_ctime_current(old_inode); in ext2_rename()
388 mark_inode_dirty(old_inode); in ext2_rename()
393 err = ext2_set_link(old_inode, dir_de, dir_folio, in ext2_rename()
/linux-6.12.1/fs/minix/
Dnamei.c181 struct inode * old_inode = d_inode(old_dentry); in minix_rename() local
196 if (S_ISDIR(old_inode->i_mode)) { in minix_rename()
198 dir_de = minix_dotdot(old_inode, &dir_folio); in minix_rename()
215 err = minix_set_link(new_de, new_folio, old_inode); in minix_rename()
224 err = minix_add_link(new_dentry, old_inode); in minix_rename()
235 mark_inode_dirty(old_inode); in minix_rename()
/linux-6.12.1/fs/reiserfs/
Dnamei.c1317 struct inode *old_inode, *new_dentry_inode; in reiserfs_rename() local
1347 old_inode = d_inode(old_dentry); in reiserfs_rename()
1366 if (retval != NAME_FOUND || old_de.de_objectid != old_inode->i_ino) { in reiserfs_rename()
1371 if (S_ISDIR(old_inode->i_mode)) { in reiserfs_rename()
1391 reiserfs_find_entry(old_inode, "..", 2, in reiserfs_rename()
1418 new_dentry->d_name.len, old_inode, 0); in reiserfs_rename()
1437 reiserfs_update_inode_transaction(old_inode); in reiserfs_rename()
1459 reiserfs_prepare_for_journal(old_inode->i_sb, old_de.de_bh, 1); in reiserfs_rename()
1483 reiserfs_prepare_for_journal(old_inode->i_sb, new_de.de_bh, 1); in reiserfs_rename()
1501 reiserfs_prepare_for_journal(old_inode->i_sb, in reiserfs_rename()
[all …]
/linux-6.12.1/fs/nilfs2/
Dnamei.c361 struct inode *old_inode = d_inode(old_dentry); in nilfs_rename() local
383 if (S_ISDIR(old_inode->i_mode)) { in nilfs_rename()
385 dir_de = nilfs_dotdot(old_inode, &dir_folio); in nilfs_rename()
404 nilfs_set_link(new_dir, new_de, new_folio, old_inode); in nilfs_rename()
413 err = nilfs_add_link(new_dentry, old_inode); in nilfs_rename()
426 inode_set_ctime_current(old_inode); in nilfs_rename()
431 nilfs_set_link(old_inode, dir_de, dir_folio, new_dir); in nilfs_rename()
438 nilfs_mark_inode_dirty(old_inode); in nilfs_rename()
/linux-6.12.1/fs/bfs/
Ddir.c206 struct inode *old_inode, *new_inode; in bfs_rename() local
216 old_inode = d_inode(old_dentry); in bfs_rename()
217 if (S_ISDIR(old_inode->i_mode)) in bfs_rename()
220 info = BFS_SB(old_inode->i_sb); in bfs_rename()
225 if (!old_bh || (le16_to_cpu(old_de->ino) != old_inode->i_ino)) in bfs_rename()
238 old_inode->i_ino); in bfs_rename()
/linux-6.12.1/fs/udf/
Dnamei.c765 struct inode *old_inode = d_inode(old_dentry); in udf_rename() local
780 if (udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) != old_inode->i_ino) { in udf_rename()
785 if (S_ISDIR(old_inode->i_mode)) { in udf_rename()
794 retval = udf_fiiter_find_entry(old_inode, &dotdot_name, in udf_rename()
797 udf_err(old_inode->i_sb, in udf_rename()
799 old_inode->i_ino); in udf_rename()
806 if (udf_get_lb_pblock(old_inode->i_sb, &tloc, 0) != in udf_rename()
809 udf_err(old_inode->i_sb, in udf_rename()
811 old_inode->i_ino, old_dir->i_ino, in udf_rename()
812 udf_get_lb_pblock(old_inode->i_sb, &tloc, 0)); in udf_rename()
[all …]
/linux-6.12.1/fs/ocfs2/
Dnamei.c1209 struct inode *old_inode = d_inode(old_dentry); in ocfs2_rename() local
1269 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
1280 old_inode->i_ino); in ocfs2_rename()
1287 (unsigned long long)old_inode->i_ino, in ocfs2_rename()
1326 status = ocfs2_inode_lock_nested(old_inode, &old_inode_bh, 1, in ocfs2_rename()
1341 if (S_ISDIR(old_inode->i_mode) && new_dir != old_dir) { in ocfs2_rename()
1346 old_inode, in ocfs2_rename()
1378 if (old_de_ino != OCFS2_I(old_inode)->ip_blkno) { in ocfs2_rename()
1513 old_inode); in ocfs2_rename()
1536 status = ocfs2_add_entry(handle, new_dentry, old_inode, in ocfs2_rename()
[all …]
Dxattr.h80 int ocfs2_reflink_xattrs(struct inode *old_inode,
Dxattr.c6179 struct inode *old_inode; member
6343 struct super_block *sb = args->old_inode->i_sb; in ocfs2_reflink_xattr_header()
6413 ret = ocfs2_xattr_get_clusters(args->old_inode, in ocfs2_reflink_xattr_header()
6430 args->old_inode->i_sb, in ocfs2_reflink_xattr_header()
6461 struct ocfs2_super *osb = OCFS2_SB(args->old_inode->i_sb); in ocfs2_reflink_xattr_inline()
6740 struct ocfs2_super *osb = OCFS2_SB(args->reflink->old_inode->i_sb); in ocfs2_lock_reflink_xattr_rec_allocators()
6745 ret = ocfs2_iterate_xattr_buckets(args->reflink->old_inode, blkno, len, in ocfs2_lock_reflink_xattr_rec_allocators()
6825 struct super_block *sb = args->reflink->old_inode->i_sb; in ocfs2_reflink_xattr_bucket()
7049 para.old_bucket = ocfs2_xattr_bucket_new(args->old_inode); in ocfs2_reflink_xattr_tree()
7062 ret = ocfs2_iterate_xattr_index_block(args->old_inode, blk_bh, in ocfs2_reflink_xattr_tree()
[all …]
/linux-6.12.1/fs/exfat/
Dnamei.c1250 struct inode *old_inode, *new_inode; in exfat_rename() local
1265 old_inode = old_dentry->d_inode; in exfat_rename()
1268 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename()
1281 i_pos = ((loff_t)EXFAT_I(old_inode)->dir.dir << 32) | in exfat_rename()
1282 (EXFAT_I(old_inode)->entry & 0xffffffff); in exfat_rename()
1283 exfat_unhash_inode(old_inode); in exfat_rename()
1284 exfat_hash_inode(old_inode, i_pos); in exfat_rename()
1286 exfat_sync_inode(old_inode); in exfat_rename()
1288 mark_inode_dirty(old_inode); in exfat_rename()
1290 if (S_ISDIR(old_inode->i_mode) && old_dir != new_dir) { in exfat_rename()
/linux-6.12.1/fs/omfs/
Ddir.c378 struct inode *old_inode = d_inode(old_dentry); in omfs_rename() local
398 err = omfs_add_link(new_dentry, old_inode); in omfs_rename()
402 inode_set_ctime_current(old_inode); in omfs_rename()
403 mark_inode_dirty(old_inode); in omfs_rename()
/linux-6.12.1/fs/ubifs/
Ddir.c1326 struct inode *old_inode = d_inode(old_dentry); in do_rename() local
1329 struct ubifs_inode *old_inode_ui = ubifs_inode(old_inode); in do_rename()
1332 int is_dir = S_ISDIR(old_inode->i_mode); in do_rename()
1353 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename()
1505 if (IS_SYNC(old_inode)) { in do_rename()
1516 err = ubifs_jnl_rename(c, old_dir, old_inode, &old_nm, new_dir, in do_rename()
1531 mark_inode_dirty_sync(old_inode); in do_rename()
1536 if (IS_SYNC(old_inode)) in do_rename()
1542 old_inode->i_sb->s_op->write_inode(old_inode, NULL); in do_rename()
Djournal.c1351 const struct inode *old_inode, in ubifs_jnl_rename() argument
1420 dent->inum = cpu_to_le64(old_inode->i_ino); in ubifs_jnl_rename()
1421 dent->type = get_dent_type(old_inode->i_mode); in ubifs_jnl_rename()
Dubifs.h1808 const struct inode *old_inode,
/linux-6.12.1/fs/9p/
Dvfs_inode.c872 struct inode *old_inode; in v9fs_vfs_rename() local
884 old_inode = d_inode(old_dentry); in v9fs_vfs_rename()
886 v9ses = v9fs_inode2v9ses(old_inode); in v9fs_vfs_rename()
943 if (S_ISDIR(old_inode->i_mode)) { in v9fs_vfs_rename()
948 v9fs_invalidate_inode_attr(old_inode); in v9fs_vfs_rename()
/linux-6.12.1/block/
Dbdev.c1219 struct inode *inode, *old_inode = NULL; in sync_bdevs() local
1243 iput(old_inode); in sync_bdevs()
1244 old_inode = inode; in sync_bdevs()
1266 iput(old_inode); in sync_bdevs()
/linux-6.12.1/fs/btrfs/
Dinode.c7897 struct inode *old_inode = old_dentry->d_inode; in btrfs_rename_exchange() local
7900 u64 old_ino = btrfs_ino(BTRFS_I(old_inode)); in btrfs_rename_exchange()
7992 BTRFS_I(old_inode)->dir_index = 0ULL; in btrfs_rename_exchange()
8026 inode_inc_iversion(old_inode); in btrfs_rename_exchange()
8032 BTRFS_I(old_inode), true); in btrfs_rename_exchange()
8045 ret = btrfs_update_inode(trans, BTRFS_I(old_inode)); in btrfs_rename_exchange()
8067 ret = btrfs_add_link(trans, BTRFS_I(new_dir), BTRFS_I(old_inode), in btrfs_rename_exchange()
8081 if (old_inode->i_nlink == 1) in btrfs_rename_exchange()
8082 BTRFS_I(old_inode)->dir_index = old_idx; in btrfs_rename_exchange()
8153 struct inode *old_inode = d_inode(old_dentry); in btrfs_rename() local
[all …]
/linux-6.12.1/fs/nfs/
Ddir.c2721 struct inode *old_inode = d_inode(old_dentry); in nfs_rename() local
2780 if (S_ISREG(old_inode->i_mode)) in nfs_rename()
2781 nfs_sync_inode(old_inode); in nfs_rename()
2801 spin_lock(&old_inode->i_lock); in nfs_rename()
2802 NFS_I(old_inode)->attr_gencount = nfs_inc_attr_generation_counter(); in nfs_rename()
2803 nfs_set_cache_invalid(old_inode, NFS_INO_INVALID_CHANGE | in nfs_rename()
2806 spin_unlock(&old_inode->i_lock); in nfs_rename()
/linux-6.12.1/fs/quota/
Ddquot.c1023 struct inode *inode, *old_inode = NULL; in add_dquot_ref() local
1046 iput(old_inode); in add_dquot_ref()
1061 old_inode = inode; in add_dquot_ref()
1066 iput(old_inode); in add_dquot_ref()
/linux-6.12.1/security/selinux/
Dhooks.c3048 static int selinux_inode_rename(struct inode *old_inode, struct dentry *old_dentry, in selinux_inode_rename() argument
3051 return may_rename(old_inode, old_dentry, new_inode, new_dentry); in selinux_inode_rename()

12