提交 b8cd952b 编写于 作者: Y Yehuda Sadeh 提交者: Sage Weil

ceph: dereference pointer after checking for NULL

moved dereference after BUG_ON
Signed-off-by: NYehuda Sadeh <yehuda@hq.newdream.net>
上级 e11b05d3
......@@ -851,11 +851,12 @@ static void ceph_set_dentry_offset(struct dentry *dn)
{
struct dentry *dir = dn->d_parent;
struct inode *inode = dir->d_inode;
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_inode_info *ci;
struct ceph_dentry_info *di;
BUG_ON(!inode);
ci = ceph_inode(inode);
di = ceph_dentry(dn);
spin_lock(&ci->i_ceph_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册