Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102907840
D27936.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27936.diff
View Options
diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -432,18 +432,6 @@
return ENXIO;
}
- if (!(dataflags & FSESS_POSIX_LOCKS))
- return vop_stdadvlock(ap);
- /* FUSE doesn't properly support flock until protocol 7.17 */
- if (flags & F_FLOCK)
- return vop_stdadvlock(ap);
-
- err = fuse_filehandle_get_anyflags(vp, &fufh, cred, pid);
- if (err)
- return err;
-
- fdisp_init(&fdi, sizeof(*fli));
-
switch(ap->a_op) {
case F_GETLK:
op = FUSE_GETLK;
@@ -458,6 +446,20 @@
return EINVAL;
}
+ if (!(dataflags & FSESS_POSIX_LOCKS))
+ return vop_stdadvlock(ap);
+ /* FUSE doesn't properly support flock until protocol 7.17 */
+ if (flags & F_FLOCK)
+ return vop_stdadvlock(ap);
+
+ vn_lock(vp, LK_SHARED | LK_RETRY);
+
+ err = fuse_filehandle_get_anyflags(vp, &fufh, cred, pid);
+ if (err)
+ goto out;
+
+ fdisp_init(&fdi, sizeof(*fli));
+
fdisp_make_vp(&fdi, op, vp, td, cred);
fli = fdi.indata;
fli->fh = fufh->fh_id;
@@ -487,6 +489,8 @@
}
}
+out:
+ VOP_UNLOCK(vp);
return err;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 2:45 PM (22 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14718340
Default Alt Text
D27936.diff (1 KB)
Attached To
Mode
D27936: Fix a vnode locking bug in fuse_vnop_advlock.
Attached
Detach File
Event Timeline
Log In to Comment