Subject: [merged] ocfs2-add-necessary-check-in-case-sb_getblk-fails.patch removed from -mm tree To: rui.xiang@xxxxxxxxxx,jeff.liu@xxxxxxxxxx,jlbec@xxxxxxxxxxxx,joseph.qi@xxxxxxxxxx,mfasheh@xxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 13 Nov 2013 12:37:14 -0800 The patch titled Subject: ocfs2: add necessary check in case sb_getblk() fails has been removed from the -mm tree. Its filename was ocfs2-add-necessary-check-in-case-sb_getblk-fails.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Rui Xiang <rui.xiang@xxxxxxxxxx> Subject: ocfs2: add necessary check in case sb_getblk() fails sb_getblk() may return an err, so add a check for bh. [joseph.qi@xxxxxxxxxx: also add a check after calling sb_getblk() in ocfs2_create_xattr_block()] Signed-off-by: Rui Xiang <rui.xiang@xxxxxxxxxx> Reviewed-by: Jie Liu <jeff.liu@xxxxxxxxxx> Reviewed-by: Mark Fasheh <mfasheh@xxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Joseph Qi <joseph.qi@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/refcounttree.c | 5 +++++ fs/ocfs2/xattr.c | 6 ++++++ 2 files changed, 11 insertions(+) diff -puN fs/ocfs2/refcounttree.c~ocfs2-add-necessary-check-in-case-sb_getblk-fails fs/ocfs2/refcounttree.c --- a/fs/ocfs2/refcounttree.c~ocfs2-add-necessary-check-in-case-sb_getblk-fails +++ a/fs/ocfs2/refcounttree.c @@ -612,6 +612,11 @@ static int ocfs2_create_refcount_tree(st } new_bh = sb_getblk(inode->i_sb, first_blkno); + if (!new_bh) { + ret = -ENOMEM; + mlog_errno(ret); + goto out_commit; + } ocfs2_set_new_buffer_uptodate(&new_tree->rf_ci, new_bh); ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, diff -puN fs/ocfs2/xattr.c~ocfs2-add-necessary-check-in-case-sb_getblk-fails fs/ocfs2/xattr.c --- a/fs/ocfs2/xattr.c~ocfs2-add-necessary-check-in-case-sb_getblk-fails +++ a/fs/ocfs2/xattr.c @@ -2864,6 +2864,12 @@ static int ocfs2_create_xattr_block(stru } new_bh = sb_getblk(inode->i_sb, first_blkno); + if (!new_bh) { + ret = -ENOMEM; + mlog_errno(ret); + goto end; + } + ocfs2_set_new_buffer_uptodate(INODE_CACHE(inode), new_bh); ret = ocfs2_journal_access_xb(ctxt->handle, INODE_CACHE(inode), _ Patches currently in -mm which might be from rui.xiang@xxxxxxxxxx are origin.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html