xfs: fix efi/efd error handling to avoid fs shutdown hangs
Hello Brian Foster,
The patch 8d99fe92fed0: "xfs: fix efi/efd error handling to avoid fs shutdown hangs" from Aug 19, 2015, leads to the following static checker warning:
fs/xfs/xfs_bmap_util.c:134 xfs_bmap_finish() warn: error is never (-117)
fs/xfs/xfs_bmap_util.c
120 error = __xfs_trans_roll(tp, ip, &committed);
It used to be that error was set by xfs_free_extent() which does return -EFSCORRUPTED. But I don't think __xfs_trans_roll() can.
121 if (error) {
122 /*
123 * If the transaction was committed, drop the EFD reference 124 * since we're bailing out of here. The other reference is 125 * dropped when the EFI hits the AIL. 126 * 127 * If the transaction was not committed, the EFI is freed by the 128 * EFI item unlock handler on abort. Also, we have a new 129 * transaction so we should return committed=1 even though we're 130 * returning an error. 131 */
132 if (committed) {
133 xfs_efi_release(efi);
134 xfs_force_shutdown((*tp)->t_mountp,
135 (error == -EFSCORRUPTED) ?
136 SHUTDOWN_CORRUPT_INCORE :
137 SHUTDOWN_META_IO_ERROR);
138 }
139 return error;
140 }
regards,
dan carpenter
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs