Commit 88a96fa8 authored by Juerg Haefliger's avatar Juerg Haefliger Committed by Dave Kleikamp

jfs: Add missing NULL pointer check in __get_metapage

alloc_metapage can return a NULL pointer so check for that.
Signed-off-by: default avatarJuerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
parent 04d73f86
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment