diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c index 3a21ad29cf9..97f5921f7d1 100644 --- a/sys/fs/smbfs/smbfs_smb.c +++ b/sys/fs/smbfs/smbfs_smb.c @@ -363,7 +363,7 @@ smb_smb_flush(struct smbnode *np, struct smb_cred *scred) struct mbchain *mbp; int error; - if ((np->n_flag & NOPEN) != 0 || !SMBTOV(np) || + if ((np->n_flag & NOPEN) == 0 || !SMBTOV(np) || SMBTOV(np)->v_type != VREG) return 0; /* not a regular open file */ error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_FLUSH, scred);