Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8cd952b authored by Yehuda Sadeh's avatar Yehuda Sadeh Committed by Sage Weil
Browse files

ceph: dereference pointer after checking for NULL



moved dereference after BUG_ON

Signed-off-by: default avatarYehuda Sadeh <yehuda@hq.newdream.net>
parent e11b05d3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);