mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
xfs: return from xfs_symlink_verify early on V4 filesystems
V4 symlink blocks didn't have headers, so return early if this is a V4
filesystem.
Cc: <stable@vger.kernel.org> # v5.1
Fixes: 39708c20ab
("xfs: miscellaneous verifier magic value fixups")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
c004a793e0
commit
7f8b718c58
@ -92,8 +92,10 @@ xfs_symlink_verify(
|
|||||||
struct xfs_mount *mp = bp->b_mount;
|
struct xfs_mount *mp = bp->b_mount;
|
||||||
struct xfs_dsymlink_hdr *dsl = bp->b_addr;
|
struct xfs_dsymlink_hdr *dsl = bp->b_addr;
|
||||||
|
|
||||||
|
/* no verification of non-crc buffers */
|
||||||
if (!xfs_has_crc(mp))
|
if (!xfs_has_crc(mp))
|
||||||
return __this_address;
|
return NULL;
|
||||||
|
|
||||||
if (!xfs_verify_magic(bp, dsl->sl_magic))
|
if (!xfs_verify_magic(bp, dsl->sl_magic))
|
||||||
return __this_address;
|
return __this_address;
|
||||||
if (!uuid_equal(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid))
|
if (!uuid_equal(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid))
|
||||||
|
Loading…
Reference in New Issue
Block a user