FreeBSD Bugzilla – Attachment 222425 Details for
Bug 253500
[fusefs]: F_SETLKW is treated as F_SETLK and F_UNLCK is ignored
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
quick-n-dirty patch to fix fcntl locking in FUSE
freebsd-fuse-setlk.patch (text/plain), 1.18 KB, created by
John Millikin
on 2021-02-14 11:25:33 UTC
(
hide
)
Description:
quick-n-dirty patch to fix fcntl locking in FUSE
Filename:
MIME Type:
Creator:
John Millikin
Created:
2021-02-14 11:25:33 UTC
Size:
1.18 KB
patch
obsolete
>diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c >index cda64931779b..32cf3d486b66 100644 >--- a/sys/kern/kern_descrip.c >+++ b/sys/kern/kern_descrip.c >@@ -652,7 +652,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) > p->p_leader->p_flag |= P_ADVLOCK; > PROC_UNLOCK(p->p_leader); > } >- error = VOP_ADVLOCK(vp, (caddr_t)p->p_leader, F_SETLK, >+ error = VOP_ADVLOCK(vp, (caddr_t)p->p_leader, cmd, > flp, flg); > break; > case F_WRLCK: >@@ -665,11 +665,11 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) > p->p_leader->p_flag |= P_ADVLOCK; > PROC_UNLOCK(p->p_leader); > } >- error = VOP_ADVLOCK(vp, (caddr_t)p->p_leader, F_SETLK, >+ error = VOP_ADVLOCK(vp, (caddr_t)p->p_leader, cmd, > flp, flg); > break; > case F_UNLCK: >- error = VOP_ADVLOCK(vp, (caddr_t)p->p_leader, F_UNLCK, >+ error = VOP_ADVLOCK(vp, (caddr_t)p->p_leader, cmd, > flp, flg); > break; > case F_UNLCKSYS: >@@ -678,7 +678,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) > break; > } > error = VOP_ADVLOCK(vp, (caddr_t)p->p_leader, >- F_UNLCKSYS, flp, flg); >+ cmd, flp, flg); > break; > default: > error = EINVAL;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253500
:
222425
|
222867