ocfs2: add necessary check in case sb_getblk() fails
authorRui Xiang <rui.xiang@huawei.com>
Tue, 12 Nov 2013 23:06:55 +0000 (15:06 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:00 +0000 (12:09 +0900)
commit58796207cf09552706b0c3e0669f2ce52ea6cee1
treec3023177cd5414a1199da59ba8d52f74f7a64d32
parent7391a294b861bf2c3b762dfdcf61b9c5f1bffa1f
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/refcounttree.c
fs/ocfs2/xattr.c