diff options
author | Sage Weil <sage@newdream.net> | 2010-11-06 15:41:16 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-11-07 11:40:43 -0500 |
commit | d8b16b3d1c9d8d9124d647d05797383d35e2d645 (patch) | |
tree | 29bd57396f016572b5535c17a198b24062e2c79d /fs/ceph/inode.c | |
parent | df9f86faf3ee610527ed02031fe7dd3c8b752e44 (diff) |
ceph: fix bad pointer dereference in ceph_fill_trace
We dereference *in a few lines down, but only set it on rename. It is
apparently pretty rare for this to trigger, but I have been hitting it
with a clustered MDSs.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-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 1d6a45b5a04c..cd0432c03d2f 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -1055,7 +1055,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, | |||
1055 | ininfo = rinfo->targeti.in; | 1055 | ininfo = rinfo->targeti.in; |
1056 | vino.ino = le64_to_cpu(ininfo->ino); | 1056 | vino.ino = le64_to_cpu(ininfo->ino); |
1057 | vino.snap = le64_to_cpu(ininfo->snapid); | 1057 | vino.snap = le64_to_cpu(ininfo->snapid); |
1058 | if (!dn->d_inode) { | 1058 | in = dn->d_inode; |
1059 | if (!in) { | ||
1059 | in = ceph_get_inode(sb, vino); | 1060 | in = ceph_get_inode(sb, vino); |
1060 | if (IS_ERR(in)) { | 1061 | if (IS_ERR(in)) { |
1061 | pr_err("fill_trace bad get_inode " | 1062 | pr_err("fill_trace bad get_inode " |