提交 4ce1e9ad 编写于 作者: A Alexander Beregalov 提交者: Sage Weil

ceph: move dereference after NULL test

Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: NSage Weil <sage@newdream.net>
上级 5b3a4db3
......@@ -144,7 +144,7 @@ static int ceph_set_page_dirty(struct page *page)
*/
static void ceph_invalidatepage(struct page *page, unsigned long offset)
{
struct inode *inode = page->mapping->host;
struct inode *inode;
struct ceph_inode_info *ci;
struct ceph_snap_context *snapc = (void *)page->private;
......@@ -153,6 +153,8 @@ static void ceph_invalidatepage(struct page *page, unsigned long offset)
BUG_ON(!PagePrivate(page));
BUG_ON(!page->mapping);
inode = page->mapping->host;
/*
* We can get non-dirty pages here due to races between
* set_page_dirty and truncate_complete_page; just spit out a
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册