提交 a8789a5a 编写于 作者: C Colin Ian King 提交者: Darrick J. Wong

xfs: fix check on struct_version for versions 4 or greater

It appears that the check for versions 4 or more is incorrect and is
off-by-one. Fix this.

Detected by CoverityScan, CID#1463775 ("Logically dead code")

Fixes: ac503a4c ("xfs: refactor the geometry structure filling function")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 1da06189
......@@ -951,7 +951,7 @@ xfs_fs_geometry(
geo->rtsectsize = sbp->sb_blocksize;
geo->dirblocksize = xfs_dir2_dirblock_bytes(sbp);
if (struct_version < 3)
if (struct_version < 4)
return 0;
if (xfs_sb_version_haslogv2(sbp))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册