Reduce lock scope a little.

This commit is contained in:
Pawel Jakub Dawidek 2013-03-01 21:57:02 +00:00
parent a587c657ef
commit f4d0191b22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=247584

View File

@ -2633,9 +2633,9 @@ setfflags(td, vp, flags)
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
return (error);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VATTR_NULL(&vattr);
vattr.va_flags = flags;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
#ifdef MAC
error = mac_vnode_check_setflags(td->td_ucred, vp, vattr.va_flags);
if (error == 0)