lkml.org 
[lkml]   [2018]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectre: xfs: cancel dfops on xfs_defer_finish() error
Date
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

\
 
 \ /
  Last update: 2018-08-07 16:14    [W:0.177 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site