/linux/tools/testing/selftests/landlock/ |
H A D | fs_test.c | 62 #ifndef RENAME_EXCHANGE 63 #define RENAME_EXCHANGE (1 << 1) macro 2218 if (renameat2(AT_FDCWD, oldpath, AT_FDCWD, newpath, RENAME_EXCHANGE)) in test_exchange() 2253 RENAME_EXCHANGE)); in TEST_F_FORK() 2256 RENAME_EXCHANGE)); in TEST_F_FORK() 2266 RENAME_EXCHANGE)); in TEST_F_FORK() 2269 RENAME_EXCHANGE)); in TEST_F_FORK() 2274 RENAME_EXCHANGE)); in TEST_F_FORK() 2280 RENAME_EXCHANGE)); in TEST_F_FORK() 2295 RENAME_EXCHANGE)); in TEST_F_FORK() [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | test_bpffs.c | 101 err = renameat2(0, TDIR "/fs1/a", 0, TDIR "/fs1/b", RENAME_EXCHANGE); in fn() 117 err = renameat2(0, TDIR "/fs1/c", 0, TDIR "/fs1/b", RENAME_EXCHANGE); in fn()
|
/linux/tools/testing/selftests/filesystems/fat/ |
H A D | rename_exchange.c | 30 ret = renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_EXCHANGE); in main()
|
/linux/fs/overlayfs/ |
H A D | dir.c | 124 flags = RENAME_EXCHANGE; in ovl_cleanup_and_whiteout() 415 err = ovl_do_rename(ofs, wdir, opaquedir, udir, upper, RENAME_EXCHANGE); in ovl_clear_empty() 523 RENAME_EXCHANGE); in ovl_create_over_whiteout() 1107 bool overwrite = !(flags & RENAME_EXCHANGE); in ovl_rename() 1117 if (flags & ~(RENAME_EXCHANGE | RENAME_NOREPLACE)) in ovl_rename() 1142 flags |= RENAME_EXCHANGE; in ovl_rename() 1145 flags |= RENAME_EXCHANGE; in ovl_rename() 1248 if (flags & RENAME_EXCHANGE) in ovl_rename()
|
/linux/tools/testing/selftests/openat2/ |
H A D | rename_attack_test.c | 66 renameat2(dirfd, a, dirfd, b, RENAME_EXCHANGE); in spawn_attack()
|
/linux/fs/ |
H A D | namei.c | 4974 if (!(flags & RENAME_EXCHANGE)) in vfs_rename() 4998 if ((flags & RENAME_EXCHANGE) && new_is_dir) { in vfs_rename() 5027 lock_new_subdir = new_dir != old_dir || !(flags & RENAME_EXCHANGE); in vfs_rename() 5053 if ((flags & RENAME_EXCHANGE) && !is_dir && new_is_dir && in vfs_rename() 5072 if (!(flags & RENAME_EXCHANGE) && target) { in vfs_rename() 5081 if (!(flags & RENAME_EXCHANGE)) in vfs_rename() 5094 !(flags & RENAME_EXCHANGE) ? target : NULL, old_dentry); in vfs_rename() 5095 if (flags & RENAME_EXCHANGE) { in vfs_rename() 5120 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) in do_renameat2() 5124 (flags & RENAME_EXCHANGE)) in do_renameat2() [all …]
|
H A D | libfs.c | 845 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE)) in simple_rename() 848 if (flags & RENAME_EXCHANGE) in simple_rename()
|
/linux/fs/affs/ |
H A D | namei.c | 511 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE)) in affs_rename2() 517 if (flags & RENAME_EXCHANGE) in affs_rename2()
|
/linux/tools/include/uapi/linux/ |
H A D | fs.h | 51 #define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */ macro
|
/linux/tools/perf/trace/beauty/include/uapi/linux/ |
H A D | fs.h | 51 #define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */ macro
|
/linux/include/uapi/linux/ |
H A D | fs.h | 60 #define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */ 51 #define RENAME_EXCHANGE global() macro
|
/linux/fs/crypto/ |
H A D | hooks.c | 107 if ((flags & RENAME_EXCHANGE) && in __fscrypt_prepare_rename()
|
/linux/security/tomoyo/ |
H A D | tomoyo.c | 293 if (flags & RENAME_EXCHANGE) { in tomoyo_path_rename()
|
/linux/fs/fat/ |
H A D | namei_vfat.c | 1165 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE)) in vfat_rename2() 1168 if (flags & RENAME_EXCHANGE) { in vfat_rename2()
|
/linux/fs/xfs/ |
H A D | xfs_iops.c | 484 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) in xfs_vn_rename() 488 if (flags & RENAME_EXCHANGE) in xfs_vn_rename()
|
H A D | xfs_inode.c | 2138 if ((flags & RENAME_EXCHANGE) && !target_ip) in xfs_rename() 2240 if (flags & RENAME_EXCHANGE) { in xfs_rename()
|
/linux/fs/f2fs/ |
H A D | namei.c | 1253 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) in f2fs_rename2() 1264 if (flags & RENAME_EXCHANGE) in f2fs_rename2()
|
/linux/fs/ubifs/ |
H A D | dir.c | 1653 if (flags & ~(RENAME_NOREPLACE | RENAME_WHITEOUT | RENAME_EXCHANGE)) in ubifs_rename() 1664 if (flags & RENAME_EXCHANGE) in ubifs_rename()
|
/linux/security/apparmor/ |
H A D | lsm.c | 390 if ((flags & RENAME_EXCHANGE) && !path_mediated_fs(new_dentry)) in apparmor_path_rename() 407 if (flags & RENAME_EXCHANGE) { in apparmor_path_rename()
|
/linux/fs/hostfs/ |
H A D | hostfs_kern.c | 760 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE)) in hostfs_rename2()
|
/linux/security/landlock/ |
H A D | fs.c | 1412 !!(flags & RENAME_EXCHANGE)); in hook_path_rename()
|
/linux/fs/bcachefs/ |
H A D | fs.c | 880 enum bch_rename_mode mode = flags & RENAME_EXCHANGE in bch2_rename2() 887 if (flags & ~(RENAME_NOREPLACE|RENAME_EXCHANGE|RENAME_WHITEOUT)) in bch2_rename2()
|
/linux/Documentation/filesystems/ |
H A D | directory-locking.rst | 51 allowed only with RENAME_EXCHANGE, and that won't be removing the target).
|
/linux/fs/ext4/ |
H A D | namei.c | 4205 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) in ext4_rename2() 4213 if (flags & RENAME_EXCHANGE) { in ext4_rename2()
|
/linux/mm/ |
H A D | shmem.c | 4032 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) in shmem_fileattr_set() 4035 if (flags & RENAME_EXCHANGE) in shmem_fileattr_set()
|