From: Christoph Hellwig Date: Wed, 13 Aug 2008 06:51:29 +0000 (+1000) Subject: [XFS] use KM_MAYFAIL in xfs_mountfs X-Git-Tag: v2.6.27-rc4~106^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d62c251fe4a06144255291cffd68cbadf3bf002f;p=linux-2.6-omap-h63xx.git [XFS] use KM_MAYFAIL in xfs_mountfs Use KM_MAYFAIL for the m_perag allocation, we can deal with the error easily and blocking forever during mount is not a good idea either. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31837a Signed-off-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy --- diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 081fb6a02ac..a4503f5e949 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -1052,8 +1052,10 @@ xfs_mountfs( * Allocate and initialize the per-ag data. */ init_rwsem(&mp->m_peraglock); - mp->m_perag = - kmem_zalloc(sbp->sb_agcount * sizeof(xfs_perag_t), KM_SLEEP); + mp->m_perag = kmem_zalloc(sbp->sb_agcount * sizeof(xfs_perag_t), + KM_MAYFAIL); + if (!mp->m_perag) + goto error1; mp->m_maxagi = xfs_initialize_perag(mp, sbp->sb_agcount);