Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/fs/fat/
Dnamei_msdos.c434 struct inode *old_inode, *new_inode; in do_msdos_rename() local
441 old_inode = d_inode(old_dentry); in do_msdos_rename()
450 is_dir = S_ISDIR(old_inode->i_mode); in do_msdos_rename()
453 if (fat_get_dotdot_entry(old_inode, &dotdot_bh, &dotdot_de)) { in do_msdos_rename()
459 old_attrs = MSDOS_I(old_inode)->i_attrs; in do_msdos_rename()
469 MSDOS_I(old_inode)->i_attrs |= ATTR_HIDDEN; in do_msdos_rename()
471 MSDOS_I(old_inode)->i_attrs &= ~ATTR_HIDDEN; in do_msdos_rename()
473 err = fat_sync_inode(old_inode); in do_msdos_rename()
475 MSDOS_I(old_inode)->i_attrs = old_attrs; in do_msdos_rename()
479 mark_inode_dirty(old_inode); in do_msdos_rename()
[all …]
Dnamei_vfat.c901 struct inode *old_inode, *new_inode; in vfat_rename() local
912 old_inode = d_inode(old_dentry); in vfat_rename()
919 is_dir = S_ISDIR(old_inode->i_mode); in vfat_rename()
922 if (fat_get_dotdot_entry(old_inode, &dotdot_bh, &dotdot_de)) { in vfat_rename()
946 fat_detach(old_inode); in vfat_rename()
947 fat_attach(old_inode, new_i_pos); in vfat_rename()
949 err = fat_sync_inode(old_inode); in vfat_rename()
953 mark_inode_dirty(old_inode); in vfat_rename()
957 mark_buffer_dirty_inode(dotdot_bh, old_inode); in vfat_rename()
999 mark_buffer_dirty_inode(dotdot_bh, old_inode); in vfat_rename()
[all …]
/kernel/linux/linux-5.10/fs/ufs/
Dnamei.c247 struct inode *old_inode = d_inode(old_dentry); in ufs_rename() local
262 if (S_ISDIR(old_inode->i_mode)) { in ufs_rename()
264 dir_de = ufs_dotdot(old_inode, &dir_page); in ufs_rename()
281 ufs_set_link(new_dir, new_de, new_page, old_inode, 1); in ufs_rename()
287 err = ufs_add_link(new_dentry, old_inode); in ufs_rename()
298 old_inode->i_ctime = current_time(old_inode); in ufs_rename()
301 mark_inode_dirty(old_inode); in ufs_rename()
305 ufs_set_link(old_inode, dir_de, dir_page, new_dir, 0); in ufs_rename()
/kernel/linux/linux-5.10/fs/f2fs/
Dnamei.c918 struct inode *old_inode = d_inode(old_dentry); in f2fs_rename() local
980 if (S_ISDIR(old_inode->i_mode)) { in f2fs_rename()
981 old_dir_entry = f2fs_parent_dir(old_inode, &old_dir_page); in f2fs_rename()
1012 f2fs_set_link(new_dir, new_entry, new_page, old_inode); in f2fs_rename()
1031 err = f2fs_add_link(new_dentry, old_inode); in f2fs_rename()
1041 down_write(&F2FS_I(old_inode)->i_sem); in f2fs_rename()
1043 file_lost_pino(old_inode); in f2fs_rename()
1046 f2fs_i_pino_write(old_inode, new_dir->i_ino); in f2fs_rename()
1047 up_write(&F2FS_I(old_inode)->i_sem); in f2fs_rename()
1049 old_inode->i_ctime = current_time(old_inode); in f2fs_rename()
[all …]
/kernel/linux/linux-5.10/fs/ext2/
Dnamei.c322 struct inode * old_inode = d_inode(old_dentry); in ext2_rename() local
347 if (S_ISDIR(old_inode->i_mode)) { in ext2_rename()
349 dir_de = ext2_dotdot(old_inode, &dir_page); in ext2_rename()
367 ext2_set_link(new_dir, new_de, new_page, old_inode, 1); in ext2_rename()
373 err = ext2_add_link(new_dentry, old_inode); in ext2_rename()
384 old_inode->i_ctime = current_time(old_inode); in ext2_rename()
385 mark_inode_dirty(old_inode); in ext2_rename()
391 ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0); in ext2_rename()
/kernel/linux/linux-5.10/fs/minix/
Dnamei.c188 struct inode * old_inode = d_inode(old_dentry); in minix_rename() local
203 if (S_ISDIR(old_inode->i_mode)) { in minix_rename()
205 dir_de = minix_dotdot(old_inode, &dir_page); in minix_rename()
222 minix_set_link(new_de, new_page, old_inode); in minix_rename()
228 err = minix_add_link(new_dentry, old_inode); in minix_rename()
236 mark_inode_dirty(old_inode); in minix_rename()
/kernel/linux/linux-5.10/fs/sysv/
Dnamei.c193 struct inode * old_inode = d_inode(old_dentry); in sysv_rename() local
208 if (S_ISDIR(old_inode->i_mode)) { in sysv_rename()
210 dir_de = sysv_dotdot(old_inode, &dir_page); in sysv_rename()
227 sysv_set_link(new_de, new_page, old_inode); in sysv_rename()
233 err = sysv_add_link(new_dentry, old_inode); in sysv_rename()
241 mark_inode_dirty(old_inode); in sysv_rename()
/kernel/linux/linux-5.10/fs/nilfs2/
Dnamei.c345 struct inode *old_inode = d_inode(old_dentry); in nilfs_rename() local
366 if (S_ISDIR(old_inode->i_mode)) { in nilfs_rename()
368 dir_de = nilfs_dotdot(old_inode, &dir_page); in nilfs_rename()
385 nilfs_set_link(new_dir, new_de, new_page, old_inode); in nilfs_rename()
393 err = nilfs_add_link(new_dentry, old_inode); in nilfs_rename()
406 old_inode->i_ctime = current_time(old_inode); in nilfs_rename()
411 nilfs_set_link(old_inode, dir_de, dir_page, new_dir); in nilfs_rename()
415 nilfs_mark_inode_dirty(old_inode); in nilfs_rename()
/kernel/linux/linux-5.10/fs/reiserfs/
Dnamei.c1321 struct inode *old_inode, *new_dentry_inode; in reiserfs_rename() local
1352 old_inode = d_inode(old_dentry); in reiserfs_rename()
1371 if (retval != NAME_FOUND || old_de.de_objectid != old_inode->i_ino) { in reiserfs_rename()
1376 old_inode_mode = old_inode->i_mode; in reiserfs_rename()
1396 reiserfs_find_entry(old_inode, "..", 2, &dot_dot_entry_path, in reiserfs_rename()
1420 new_dentry->d_name.len, old_inode, 0); in reiserfs_rename()
1439 reiserfs_update_inode_transaction(old_inode); in reiserfs_rename()
1461 reiserfs_prepare_for_journal(old_inode->i_sb, old_de.de_bh, 1); in reiserfs_rename()
1485 reiserfs_prepare_for_journal(old_inode->i_sb, new_de.de_bh, 1); in reiserfs_rename()
1487 if (S_ISDIR(old_inode->i_mode)) { in reiserfs_rename()
[all …]
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/fs/udf/
Dnamei.c1079 struct inode *old_inode = d_inode(old_dentry); in udf_rename() local
1087 struct udf_inode_info *old_iinfo = UDF_I(old_inode); in udf_rename()
1104 if (udf_get_lb_pblock(old_dir->i_sb, &tloc, 0) != old_inode->i_ino) in udf_rename()
1118 if (S_ISDIR(old_inode->i_mode)) { in udf_rename()
1119 int offset = udf_ext0_offset(old_inode); in udf_rename()
1133 old_inode->i_sb->s_blocksize, &offset); in udf_rename()
1135 dir_bh = udf_bread(old_inode, 0, 0, &retval); in udf_rename()
1139 old_inode->i_sb->s_blocksize, &offset); in udf_rename()
1144 if (udf_get_lb_pblock(old_inode->i_sb, &tloc, 0) != in udf_rename()
1159 old_inode->i_ctime = current_time(old_inode); in udf_rename()
[all …]
/kernel/linux/linux-5.10/fs/omfs/
Ddir.c377 struct inode *old_inode = d_inode(old_dentry); in omfs_rename() local
397 err = omfs_add_link(new_dentry, old_inode); in omfs_rename()
401 old_inode->i_ctime = current_time(old_inode); in omfs_rename()
402 mark_inode_dirty(old_inode); in omfs_rename()
/kernel/linux/linux-5.10/fs/ocfs2/
Dnamei.c1202 struct inode *old_inode = d_inode(old_dentry); in ocfs2_rename() local
1262 if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
1273 old_inode->i_ino); in ocfs2_rename()
1280 (unsigned long long)old_inode->i_ino, in ocfs2_rename()
1319 status = ocfs2_inode_lock_nested(old_inode, &old_inode_bh, 1, in ocfs2_rename()
1334 if (S_ISDIR(old_inode->i_mode)) { in ocfs2_rename()
1339 old_inode, in ocfs2_rename()
1372 if (old_de_ino != OCFS2_I(old_inode)->ip_blkno) { in ocfs2_rename()
1507 old_inode); in ocfs2_rename()
1530 status = ocfs2_add_entry(handle, new_dentry, old_inode, in ocfs2_rename()
[all …]
Dxattr.h82 int ocfs2_reflink_xattrs(struct inode *old_inode,
Dxattr.c6186 struct inode *old_inode; member
6350 struct super_block *sb = args->old_inode->i_sb; in ocfs2_reflink_xattr_header()
6420 ret = ocfs2_xattr_get_clusters(args->old_inode, in ocfs2_reflink_xattr_header()
6437 args->old_inode->i_sb, in ocfs2_reflink_xattr_header()
6468 struct ocfs2_super *osb = OCFS2_SB(args->old_inode->i_sb); in ocfs2_reflink_xattr_inline()
6756 struct ocfs2_super *osb = OCFS2_SB(args->reflink->old_inode->i_sb); in ocfs2_lock_reflink_xattr_rec_allocators()
6761 ret = ocfs2_iterate_xattr_buckets(args->reflink->old_inode, blkno, len, in ocfs2_lock_reflink_xattr_rec_allocators()
6841 struct super_block *sb = args->reflink->old_inode->i_sb; in ocfs2_reflink_xattr_bucket()
7065 para.old_bucket = ocfs2_xattr_bucket_new(args->old_inode); in ocfs2_reflink_xattr_tree()
7078 ret = ocfs2_iterate_xattr_index_block(args->old_inode, blk_bh, in ocfs2_reflink_xattr_tree()
[all …]
/kernel/linux/linux-5.10/fs/exfat/
Dnamei.c1325 struct inode *old_inode, *new_inode; in exfat_rename() local
1339 old_inode = old_dentry->d_inode; in exfat_rename()
1342 err = __exfat_rename(old_dir, EXFAT_I(old_inode), new_dir, new_dentry); in exfat_rename()
1355 i_pos = ((loff_t)EXFAT_I(old_inode)->dir.dir << 32) | in exfat_rename()
1356 (EXFAT_I(old_inode)->entry & 0xffffffff); in exfat_rename()
1357 exfat_unhash_inode(old_inode); in exfat_rename()
1358 exfat_hash_inode(old_inode, i_pos); in exfat_rename()
1360 exfat_sync_inode(old_inode); in exfat_rename()
1362 mark_inode_dirty(old_inode); in exfat_rename()
1364 if (S_ISDIR(old_inode->i_mode) && old_dir != new_dir) { in exfat_rename()
/kernel/linux/linux-5.10/fs/ubifs/
Ddir.c1287 struct inode *old_inode = d_inode(old_dentry); in do_rename() local
1290 struct ubifs_inode *old_inode_ui = ubifs_inode(old_inode); in do_rename()
1293 int is_dir = S_ISDIR(old_inode->i_mode); in do_rename()
1315 old_dentry, old_inode->i_ino, old_dir->i_ino, in do_rename()
1415 old_inode->i_ctime = time; in do_rename()
1473 if (IS_SYNC(old_inode)) { in do_rename()
1484 err = ubifs_jnl_rename(c, old_dir, old_inode, &old_nm, new_dir, in do_rename()
1499 mark_inode_dirty_sync(old_inode); in do_rename()
1504 if (IS_SYNC(old_inode)) in do_rename()
1510 old_inode->i_sb->s_op->write_inode(old_inode, NULL); in do_rename()
Djournal.c1215 const struct inode *old_inode, in ubifs_jnl_rename() argument
1284 dent->inum = cpu_to_le64(old_inode->i_ino); in ubifs_jnl_rename()
1285 dent->type = get_dent_type(old_inode->i_mode); in ubifs_jnl_rename()
Dubifs.h1780 const struct inode *old_inode,
/kernel/linux/linux-5.10/fs/9p/
Dvfs_inode.c902 struct inode *old_inode; in v9fs_vfs_rename() local
915 old_inode = d_inode(old_dentry); in v9fs_vfs_rename()
917 v9ses = v9fs_inode2v9ses(old_inode); in v9fs_vfs_rename()
966 if (S_ISDIR(old_inode->i_mode)) { in v9fs_vfs_rename()
971 v9fs_invalidate_inode_attr(old_inode); in v9fs_vfs_rename()
/kernel/linux/linux-5.10/fs/btrfs/
Dinode.c8911 struct inode *old_inode = old_dentry->d_inode; in btrfs_rename_exchange() local
8912 struct timespec64 ctime = current_time(old_inode); in btrfs_rename_exchange()
8913 u64 old_ino = btrfs_ino(BTRFS_I(old_inode)); in btrfs_rename_exchange()
8966 BTRFS_I(old_inode)->dir_index = 0ULL; in btrfs_rename_exchange()
9010 inode_inc_iversion(old_inode); in btrfs_rename_exchange()
9014 old_inode->i_ctime = ctime; in btrfs_rename_exchange()
9019 BTRFS_I(old_inode), 1); in btrfs_rename_exchange()
9033 ret = btrfs_update_inode(trans, root, old_inode); in btrfs_rename_exchange()
9056 ret = btrfs_add_link(trans, BTRFS_I(new_dir), BTRFS_I(old_inode), in btrfs_rename_exchange()
9072 if (old_inode->i_nlink == 1) in btrfs_rename_exchange()
[all …]
/kernel/linux/linux-5.10/fs/nfs/
Ddir.c2225 struct inode *old_inode = d_inode(old_dentry); in nfs_rename() local
2275 if (S_ISREG(old_inode->i_mode)) in nfs_rename()
2276 nfs_sync_inode(old_inode); in nfs_rename()
2293 spin_lock(&old_inode->i_lock); in nfs_rename()
2294 NFS_I(old_inode)->attr_gencount = nfs_inc_attr_generation_counter(); in nfs_rename()
2295 NFS_I(old_inode)->cache_validity |= NFS_INO_INVALID_CHANGE in nfs_rename()
2298 spin_unlock(&old_inode->i_lock); in nfs_rename()
/kernel/linux/linux-5.10/fs/
Dblock_dev.c2135 struct inode *inode, *old_inode = NULL; in iterate_bdevs() local
2159 iput(old_inode); in iterate_bdevs()
2160 old_inode = inode; in iterate_bdevs()
2171 iput(old_inode); in iterate_bdevs()
/kernel/linux/linux-5.10/fs/quota/
Ddquot.c964 struct inode *inode, *old_inode = NULL; in add_dquot_ref() local
987 iput(old_inode); in add_dquot_ref()
1002 old_inode = inode; in add_dquot_ref()
1007 iput(old_inode); in add_dquot_ref()
/kernel/linux/linux-5.10/security/selinux/
Dhooks.c2974 static int selinux_inode_rename(struct inode *old_inode, struct dentry *old_dentry, in selinux_inode_rename() argument
2977 return may_rename(old_inode, old_dentry, new_inode, new_dentry); in selinux_inode_rename()

12