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

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)