diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2011-12-13 12:56:30 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2012-01-10 11:56:59 -0500 |
commit | b8cd952b51034ad9f20ca147507ee68dc641c98c (patch) | |
tree | 78fe2114ab9859eecc780206cc5d423b675b7e09 /fs/ceph | |
parent | e11b05d31f21f0ea39ea288af667887cd6c21c80 (diff) |
ceph: dereference pointer after checking for NULL
moved dereference after BUG_ON
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
851 | { | 851 | { |
852 | struct dentry *dir = dn->d_parent; | 852 | struct dentry *dir = dn->d_parent; |
853 | struct inode *inode = dir->d_inode; | 853 | struct inode *inode = dir->d_inode; |
854 | struct ceph_inode_info *ci = ceph_inode(inode); | 854 | struct ceph_inode_info *ci; |
855 | struct ceph_dentry_info *di; | 855 | struct ceph_dentry_info *di; |
856 | 856 | ||
857 | BUG_ON(!inode); | 857 | BUG_ON(!inode); |
858 | 858 | ||
859 | ci = ceph_inode(inode); | ||
859 | di = ceph_dentry(dn); | 860 | di = ceph_dentry(dn); |
860 | 861 | ||
861 | spin_lock(&ci->i_ceph_lock); | 862 | spin_lock(&ci->i_ceph_lock); |