vfs: flip a condition around in kern_statat
error tends to be 0.
This commit is contained in:
parent
c4e591c9ab
commit
3e0b486886
@ -2450,9 +2450,10 @@ kern_statat(struct thread *td, int flag, int fd, const char *path,
|
||||
return (error);
|
||||
}
|
||||
error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED);
|
||||
if (error == 0) {
|
||||
if (__predict_false(hook != NULL))
|
||||
if (__predict_false(hook != NULL)) {
|
||||
if (error == 0) {
|
||||
hook(nd.ni_vp, sbp);
|
||||
}
|
||||
}
|
||||
NDFREE_NOTHING(&nd);
|
||||
vput(nd.ni_vp);
|
||||
|
Loading…
Reference in New Issue
Block a user