[Bug 238167] fs/nfsclient/nfs_clvnops.c: suspicious "if" statement

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 27 08:59:25 UTC 2019


            Bug ID: 238167
           Summary: fs/nfsclient/nfs_clvnops.c: suspicious "if" statement
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: danfe at FreeBSD.org

PVS Studio reports: /usr/src/sys/fs/nfsclient/nfs_clvnops.c:2946:1: error: V523
The 'then' statement is equivalent to the 'else' statement.

The code indeed looks suspicious (shown with "svn blame"):

> 191783   rmacklem               BO_UNLOCK(bo);
> 191783   rmacklem               bremfree(bp);
> 191783   rmacklem               if (passone || !commit)
> 191783   rmacklem                   bp->b_flags |= B_ASYNC;
> 191783   rmacklem               else
> 191783   rmacklem                   bp->b_flags |= B_ASYNC;
> 191783   rmacklem               bwrite(bp);

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list