All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] ocfs2-add-necessary-check-in-case-sb_getblk-fails.patch removed from -mm tree
@ 2013-11-13 20:37 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2013-11-13 20:37 UTC (permalink / raw)
  To: mm-commits, mfasheh, joseph.qi, jlbec, jeff.liu, rui.xiang

Subject: [merged] ocfs2-add-necessary-check-in-case-sb_getblk-fails.patch removed from -mm tree
To: rui.xiang@huawei.com,jeff.liu@oracle.com,jlbec@evilplan.org,joseph.qi@huawei.com,mfasheh@suse.de,mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
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@huawei.com>
Subject: ocfs2: add necessary check in case sb_getblk() fails

sb_getblk() may return an err, so add a check for bh.

[joseph.qi@huawei.com: also add a check after calling sb_getblk() in ocfs2_create_xattr_block()]
Signed-off-by: Rui Xiang <rui.xiang@huawei.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Joseph Qi <joseph.qi@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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@huawei.com are

origin.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-13 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 20:37 [merged] ocfs2-add-necessary-check-in-case-sb_getblk-fails.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.