diff options
author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2019-04-06 09:34:26 +0000 |
---|---|---|
committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2019-04-06 09:34:26 +0000 |
commit | a1304030b815cf1c7dbc934cbd994d8f333eb9cd (patch) | |
tree | a2167ee95d958b53b6c38b68b6965f8ae217db41 /sys/ufs | |
parent | 44b0f624aee0d43179bf3874c70e03b6ae49a4db (diff) | |
download | src-a1304030b815cf1c7dbc934cbd994d8f333eb9cd.tar.gz src-a1304030b815cf1c7dbc934cbd994d8f333eb9cd.zip |
Introduce funlinkat syscall that always us to check if we are removing
the file associated with the given file descriptor.
Reviewed by: kib, asomers
Reviewed by: cem, jilles, brooks (they reviewed previous version)
Discussed with: pjd, and many others
Differential Revision: https://reviews.freebsd.org/D14567
Notes
Notes:
svn path=/head/; revision=345982
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index f4bdd5789ab5..7882a86ebbce 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -3431,14 +3431,15 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) } #endif /* DEBUG */ /* - * kern_unlinkat will do its own start/finish writes and + * kern_funlinkat will do its own start/finish writes and * they do not nest, so drop ours here. Setting mp == NULL * indicates that vn_finished_write is not needed down below. */ vn_finished_write(mp); mp = NULL; - error = kern_unlinkat(td, AT_FDCWD, (char *)(intptr_t)cmd.value, - UIO_USERSPACE, 0, (ino_t)cmd.size); + error = kern_funlinkat(td, AT_FDCWD, + (char *)(intptr_t)cmd.value, FD_NONE, UIO_USERSPACE, + 0, (ino_t)cmd.size); break; case FFS_SET_INODE: |