.. | .. |
---|
480 | 480 | ret = nilfs_btnode_submit_block(btnc, ptr, 0, REQ_OP_READ, 0, &bh, |
---|
481 | 481 | &submit_ptr); |
---|
482 | 482 | if (ret) { |
---|
483 | | - if (ret != -EEXIST) |
---|
484 | | - return ret; |
---|
485 | | - goto out_check; |
---|
| 483 | + if (likely(ret == -EEXIST)) |
---|
| 484 | + goto out_check; |
---|
| 485 | + if (ret == -ENOENT) { |
---|
| 486 | + /* |
---|
| 487 | + * Block address translation failed due to invalid |
---|
| 488 | + * value of 'ptr'. In this case, return internal code |
---|
| 489 | + * -EINVAL (broken bmap) to notify bmap layer of fatal |
---|
| 490 | + * metadata corruption. |
---|
| 491 | + */ |
---|
| 492 | + ret = -EINVAL; |
---|
| 493 | + } |
---|
| 494 | + return ret; |
---|
486 | 495 | } |
---|
487 | 496 | |
---|
488 | 497 | if (ra) { |
---|