Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146979108
D31712.id94326.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
786 B
Referenced Files
None
Subscribers
None
D31712.id94326.diff
View Options
Index: sys/kern/vfs_vnops.c
===================================================================
--- sys/kern/vfs_vnops.c
+++ sys/kern/vfs_vnops.c
@@ -3465,6 +3465,7 @@
vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags,
int ioflag, struct ucred *active_cred, struct ucred *file_cred)
{
+ struct ucred *cred;
struct mount *mp;
void *rl_cookie;
off_t off, len;
@@ -3508,9 +3509,14 @@
error = mac_vnode_check_write(active_cred, file_cred,
vp);
#endif
- if (error == 0)
+ if (error == 0) {
+ if (file_cred != NULL)
+ cred = file_cred;
+ else
+ cred = active_cred;
error = VOP_DEALLOCATE(vp, &off, &len, flags, ioflag,
- active_cred);
+ cred);
+ }
if ((ioflag & IO_NODELOCKED) == 0) {
VOP_UNLOCK(vp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 7:23 AM (7 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29398858
Default Alt Text
D31712.id94326.diff (786 B)
Attached To
Mode
D31712: vfs: Use file_cred for VOP_DEALLOCATE in vn_deallocate if non-NULL
Attached
Detach File
Event Timeline
Log In to Comment