OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e11b05d
)
ceph: dereference pointer after checking for NULL
author
Yehuda Sadeh
<yehuda@hq.newdream.net>
Tue, 13 Dec 2011 17:56:30 +0000
(09:56 -0800)
committer
Sage Weil
<sage@newdream.net>
Tue, 10 Jan 2012 16:56:59 +0000
(08:56 -0800)
moved dereference after BUG_ON
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
fs/ceph/inode.c
patch
|
blob
|
history
diff --git
a/fs/ceph/inode.c
b/fs/ceph/inode.c
index
87fb132
..
f556e76
100644
(file)
--- 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);