diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-01-12 19:47:50 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-01-13 01:09:08 +0300 |
commit | a8789a5ae28f69d7f3791a0e74f8c44222f3108b (patch) | |
tree | f27ae2dadeb38c8a17e74b6e534e8a5afb67ba0e /fs/xfs | |
parent | 1da061899321c15500caec735f8998f4c1e1b48f (diff) | |
download | linux-a8789a5ae28f69d7f3791a0e74f8c44222f3108b.tar.xz |
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: ac503a4cc9e8 ("xfs: refactor the geometry structure filling function")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_sb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index 35b005d66977..869a2f3f0375 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c @@ -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)) |