Reduce lock scope a little.
This commit is contained in:
parent
a587c657ef
commit
f4d0191b22
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user