mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ceph: dereference pointer after checking for NULL
moved dereference after BUG_ON Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
This commit is contained in:
parent
e11b05d31f
commit
b8cd952b51
1 changed files with 2 additions and 1 deletions
|
@ -851,11 +851,12 @@ static void ceph_set_dentry_offset(struct dentry *dn)
|
||||||
{
|
{
|
||||||
struct dentry *dir = dn->d_parent;
|
struct dentry *dir = dn->d_parent;
|
||||||
struct inode *inode = dir->d_inode;
|
struct inode *inode = dir->d_inode;
|
||||||
struct ceph_inode_info *ci = ceph_inode(inode);
|
struct ceph_inode_info *ci;
|
||||||
struct ceph_dentry_info *di;
|
struct ceph_dentry_info *di;
|
||||||
|
|
||||||
BUG_ON(!inode);
|
BUG_ON(!inode);
|
||||||
|
|
||||||
|
ci = ceph_inode(inode);
|
||||||
di = ceph_dentry(dn);
|
di = ceph_dentry(dn);
|
||||||
|
|
||||||
spin_lock(&ci->i_ceph_lock);
|
spin_lock(&ci->i_ceph_lock);
|
||||||
|
|
Loading…
Reference in a new issue