From b8cd952b51034ad9f20ca147507ee68dc641c98c Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 13 Dec 2011 09:56:30 -0800 Subject: ceph: dereference pointer after checking for NULL moved dereference after BUG_ON Signed-off-by: Yehuda Sadeh --- fs/ceph/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/ceph') diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 87fb132fb330..f556e76c72e3 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -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); -- cgit v1.2.3-58-ga151