Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157905804
D55145.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
832 B
Referenced Files
None
Subscribers
None
D55145.diff
View Options
diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c
--- a/sys/fs/fuse/fuse_internal.c
+++ b/sys/fs/fuse/fuse_internal.c
@@ -931,8 +931,16 @@
fao->attr.mtime = old_mtime.tv_sec;
fao->attr.mtimensec = old_mtime.tv_nsec;
}
- fuse_internal_cache_attrs(vp, &fao->attr, fao->attr_valid,
- fao->attr_valid_nsec, vap, true);
+ /* Upgrade to exclusive lock if needed for cache update */
+ if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) {
+ vn_lock(vp, LK_UPGRADE | LK_RETRY);
+ fuse_internal_cache_attrs(vp, &fao->attr, fao->attr_valid,
+ fao->attr_valid_nsec, vap, true);
+ vn_lock(vp, LK_DOWNGRADE | LK_RETRY);
+ } else {
+ fuse_internal_cache_attrs(vp, &fao->attr, fao->attr_valid,
+ fao->attr_valid_nsec, vap, true);
+ }
if (vtyp != vnode_vtype(vp)) {
fuse_internal_vnode_disappear(vp);
err = ENOENT;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 27, 8:57 AM (8 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33510006
Default Alt Text
D55145.diff (832 B)
Attached To
Mode
D55145: fusefs: Fix vnode lock mismatch in fuse_internal_do_getattr()
Attached
Detach File
Event Timeline
Log In to Comment