jfs: Add missing NULL pointer check in __get_metapage
alloc_metapage can return a NULL pointer so check for that. Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
This commit is contained in:
parent
04d73f86e3
commit
88a96fa841
|
@ -663,6 +663,8 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
|
|||
} else {
|
||||
INCREMENT(mpStat.pagealloc);
|
||||
mp = alloc_metapage(GFP_NOFS);
|
||||
if (!mp)
|
||||
goto unlock;
|
||||
mp->page = page;
|
||||
mp->sb = inode->i_sb;
|
||||
mp->flag = 0;
|
||||
|
|
Loading…
Reference in New Issue