xfs: don't leak EFSBADCRC to userspace
[deliverable/linux.git] / fs / xfs / xfs_symlink.c
index 14e58f2c96bd71708f1c608536b835b25f05e795..5fda18919d3b2cb1915de245d79e6fa2bec94791 100644 (file)
@@ -80,6 +80,10 @@ xfs_readlink_bmap(
                if (error) {
                        xfs_buf_ioerror_alert(bp, __func__);
                        xfs_buf_relse(bp);
+
+                       /* bad CRC means corrupted metadata */
+                       if (error == EFSBADCRC)
+                               error = EFSCORRUPTED;
                        goto out;
                }
                byte_cnt = XFS_SYMLINK_BUF_SPACE(mp, byte_cnt);
This page took 0.023911 seconds and 5 git commands to generate.