diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-11 12:53:22 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-13 11:08:01 -0800 |
commit | a71895c5dad1ab8cf30622e208d148298ab602e5 (patch) | |
tree | cb6ab48f015524f584a1a920fbed3709f48763d4 /fs/xfs/xfs_qm.c | |
parent | f9e0370648b9f9908ec97f44459a1152aecbbf45 (diff) | |
download | linux-a71895c5dad1ab8cf30622e208d148298ab602e5.tar.gz linux-a71895c5dad1ab8cf30622e208d148298ab602e5.tar.bz2 linux-a71895c5dad1ab8cf30622e208d148298ab602e5.zip |
xfs: convert open coded corruption check to use XFS_IS_CORRUPT
Convert the last of the open coded corruption check and report idioms to
use the XFS_IS_CORRUPT macro.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r-- | fs/xfs/xfs_qm.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index 66ea8e4fca86..7e264cbd15b9 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -755,19 +755,15 @@ xfs_qm_qino_alloc( if ((flags & XFS_QMOPT_PQUOTA) && (mp->m_sb.sb_gquotino != NULLFSINO)) { ino = mp->m_sb.sb_gquotino; - if (mp->m_sb.sb_pquotino != NULLFSINO) { - XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, - mp); + if (XFS_IS_CORRUPT(mp, + mp->m_sb.sb_pquotino != NULLFSINO)) return -EFSCORRUPTED; - } } else if ((flags & XFS_QMOPT_GQUOTA) && (mp->m_sb.sb_pquotino != NULLFSINO)) { ino = mp->m_sb.sb_pquotino; - if (mp->m_sb.sb_gquotino != NULLFSINO) { - XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, - mp); + if (XFS_IS_CORRUPT(mp, + mp->m_sb.sb_gquotino != NULLFSINO)) return -EFSCORRUPTED; - } } if (ino != NULLFSINO) { error = xfs_iget(mp, NULL, ino, 0, 0, ip); |