aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2005-01-11 07:36:22 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2005-01-11 07:36:22 +0000
commit8df6bac4c74fad8167cbb05a2a358a36b1ce6f78 (patch)
tree7316b582ef3e13abcf40fdc592649edfe19bde75 /sys/kern/vfs_syscalls.c
parentad3142eda4f934d9940348293082cc1392ce550d (diff)
downloadsrc-8df6bac4c74fad8167cbb05a2a358a36b1ce6f78.tar.gz
src-8df6bac4c74fad8167cbb05a2a358a36b1ce6f78.zip
Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().
I'm not sure why a credential was added to these in the first place, it is not used anywhere and it doesn't make much sense: The credentials for syncing a file (ability to write to the file) should be checked at the system call level. Credentials for syncing one or more filesystems ("none") should be checked at the system call level as well. If the filesystem implementation needs a particular credential to carry out the syncing it would logically have to the cached mount credential, or a credential cached along with any delayed write data. Discussed with: rwatson
Notes
Notes: svn path=/head/; revision=140048
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 82a5f1ff612a..17ef241c8646 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -133,8 +133,7 @@ sync(td, uap)
asyncflag = mp->mnt_flag & MNT_ASYNC;
mp->mnt_flag &= ~MNT_ASYNC;
vfs_msync(mp, MNT_NOWAIT);
- VFS_SYNC(mp, MNT_NOWAIT,
- ((td != NULL) ? td->td_ucred : NOCRED), td);
+ VFS_SYNC(mp, MNT_NOWAIT, td);
mp->mnt_flag |= asyncflag;
vn_finished_write(mp);
}
@@ -3053,7 +3052,7 @@ fsync(td, uap)
vm_object_page_clean(obj, 0, 0, 0);
VM_OBJECT_UNLOCK(obj);
}
- error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, td);
+ error = VOP_FSYNC(vp, MNT_WAIT, td);
if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP)
&& softdep_fsync_hook != NULL)
error = (*softdep_fsync_hook)(vp);