Skip to contentSkip to conversation

xfs: recovery of swap extents operations for CRC filesystems

DISCUSSION Dan Carpenter 3 participants 3 messages Sep 11, 2013

lore
Share & tools
lore
#0 lore raw

Hello Dave Chinner,

The patch 638f44163d57: "xfs: recovery of swap extents operations for CRC filesystems" from Aug 30, 2013, leads to the following static checker warning: "fs/xfs/xfs_log_recover.c:2999 xlog_recover_inode_pass2()
info: ignoring unreachable code."

fs/xfs/xfs_log_recover.c
2992 out_release:
2993 xfs_buf_relse(bp);
2994 error:
2995 if (need_free)
2996 kmem_free(in_f);

  2997          return XFS_ERROR(error);
                ^^^^^^^^^^^^^^^^^^^^^^^

2998
2999 xfs_buf_relse(bp);
3000 goto error;

These two added lines are unreachable. Sometimes people add dead code for later, so this might be intentional. It's not clear.

3001 }

regards,
dan carpenter

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 14 lines · Dan Carpenter

Hello Dave Chinner,

The patch 638f44163d57: "xfs: recovery of swap extents operations for CRC filesystems" from Aug 30, 2013, leads to the following static checker warning: "fs/xfs/xfs_log_recover.c:2999 xlog_recover_inode_pass2()
info: ignoring unreachable code."

fs/xfs/xfs_log_recover.c
2992 out_release:
2993 xfs_buf_relse(bp);
2994 error:
2995 if (need_free)
2996 kmem_free(in_f);

Quoted 8 lines
  2997          return XFS_ERROR(error);
                ^^^^^^^^^^^^^^^^^^^^^^^

2998
2999 xfs_buf_relse(bp);
3000 goto error;

These two added lines are unreachable. Sometimes people add dead code for later, so this might be intentional. It's not clear.

It's dead code. I reworked the error handling of the function and didn't clean up all the mess.

Mark, I'm away from my upstream dev environment until next week - can you send a followup patch to fix this?

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
Quoted 27 lines · Dave Chinner
Quoted 20 lines · Dan Carpenter

Hello Dave Chinner,

The patch 638f44163d57: "xfs: recovery of swap extents operations for CRC filesystems" from Aug 30, 2013, leads to the following static checker warning: "fs/xfs/xfs_log_recover.c:2999 xlog_recover_inode_pass2()
info: ignoring unreachable code."

fs/xfs/xfs_log_recover.c
2992 out_release:

   2993          xfs_buf_relse(bp);
   2994  error:
   2995          if (need_free)
   2996                  kmem_free(in_f);
   2997          return XFS_ERROR(error);
                 ^^^^^^^^^^^^^^^^^^^^^^^
   2998
   2999          xfs_buf_relse(bp);
   3000          goto error;
Quoted 2 lines

These two added lines are unreachable. Sometimes people add dead code for later, so this might be intentional. It's not clear.

It's dead code. I reworked the error handling of the function and didn't clean up all the mess.

Quoted 6 lines

Mark, I'm away from my upstream dev environment until next week - can you send a followup patch to fix this?

Cheers,

Dave.

sure. I should have caught it in review.

--Mark.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs