re: xfs: cancel dfops on xfs_defer_finish() error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Recent commit 82ff27bc52a88cb5cc400bfa64e210d3ec8dfebd ("xfs: automatic
dfops buffer relogging") removed the assignment of variable error:

-       error = xfs_defer_bjoin(tp->t_dfops, bp);
        if (error) {
                xfs_trans_bhold_release(tp, bp);
                xfs_trans_brelse(tp, bp);


.. the removal of the assignment leads to dead code on the following if
statement as error is always zero at this point.  Not sure if that was
intended, but it tripped a static analysis warning from CoverityScan.


364        xfs_trans_bhold(tp, bp);

   const: At condition error, the value of error must be equal to 0.
   dead_error_condition: The condition error cannot be true.

365        if (error) {
   CID 1472288 (#1 of 1): Logically dead code (DEADCODE)
   dead_error_begin: Execution cannot reach this statement:
xfs_trans_bhold_release(tp,....


366                xfs_trans_bhold_release(tp, bp);
367                xfs_trans_brelse(tp, bp);
368                goto error1;
369        }

Colin
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux