linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: xfs: cancel dfops on xfs_defer_finish() error
@ 2018-08-07 14:14 Colin Ian King
  2018-08-07 14:37 ` Brian Foster
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Ian King @ 2018-08-07 14:14 UTC (permalink / raw)
  To: Brian Foster, darrick.wong, linux-xfs,
	linux-kernel@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-07 17:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-07 14:14 xfs: cancel dfops on xfs_defer_finish() error Colin Ian King
2018-08-07 14:37 ` Brian Foster
2018-08-07 15:10   ` Darrick J. Wong
2018-08-07 15:18     ` Brian Foster
2018-08-07 15:26       ` Darrick J. Wong
2018-08-07 15:34         ` Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).