From: Eric Sesterhenn Date: Tue, 27 Jun 2006 22:42:26 +0000 (+1000) Subject: [XFS] Fix realtime subvolume expansion, a porting bug b0rked it. Coverity X-Git-Tag: v2.6.18-rc1~459^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73024cf11522c0233228453984b2a2b37885e336;p=linux-2.6 [XFS] Fix realtime subvolume expansion, a porting bug b0rked it. Coverity made me look at this code (bug id #344). We only return with XFS_ERROR(EINVAL) if mp->m_rtdev_targp is valid and pass it otherwise to xfs_read_buf() where some function calls later it gets dereferenced by an assert. SGI-PV: 954266 SGI-Modid: xfs-linux-melb:xfs-kern:26363a Signed-off-by: Eric Sesterhenn Signed-off-by: Nathan Scott --- diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 0c1e42b037..5a0b678956 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1929,7 +1929,7 @@ xfs_growfs_rt( /* * Initial error checking. */ - if (mp->m_rtdev_targp || mp->m_rbmip == NULL || + if (mp->m_rtdev_targp == NULL || mp->m_rbmip == NULL || (nrblocks = in->newblocks) <= sbp->sb_rblocks || (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize))) return XFS_ERROR(EINVAL);