Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107292838
D19083.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
880 B
Referenced Files
None
Subscribers
None
D19083.diff
View Options
Index: head/sys/kern/vfs_extattr.c
===================================================================
--- head/sys/kern/vfs_extattr.c
+++ head/sys/kern/vfs_extattr.c
@@ -633,8 +633,6 @@
if (nbytes > IOSIZE_MAX)
return (EINVAL);
- vn_lock(vp, LK_SHARED | LK_RETRY);
-
auiop = NULL;
sizep = NULL;
cnt = 0;
@@ -653,24 +651,25 @@
} else
sizep = &size;
+ vn_lock(vp, LK_SHARED | LK_RETRY);
+
#ifdef MAC
error = mac_vnode_check_listextattr(td->td_ucred, vp, attrnamespace);
- if (error)
- goto done;
+ if (error) {
+ VOP_UNLOCK(vp, 0);
+ return (error);
+ }
#endif
error = VOP_LISTEXTATTR(vp, attrnamespace, auiop, sizep,
td->td_ucred, td);
+ VOP_UNLOCK(vp, 0);
if (auiop != NULL) {
cnt -= auio.uio_resid;
td->td_retval[0] = cnt;
} else
td->td_retval[0] = size;
-#ifdef MAC
-done:
-#endif
- VOP_UNLOCK(vp, 0);
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 2:40 AM (16 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15775314
Default Alt Text
D19083.diff (880 B)
Attached To
Mode
D19083: extattr_list_vp: Narrow locked section somewhat
Attached
Detach File
Event Timeline
Log In to Comment