]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix reference after free
authorYan, Zheng <zyan@redhat.com>
Mon, 22 Dec 2014 02:28:27 +0000 (10:28 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 5 Feb 2015 14:40:38 +0000 (22:40 +0800)
CDir::try_trim_snap_dentry() may free the dentry

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CDir.cc

index a0d57072aa158bd2dfa9fd7b236f4733e5828219..056b1af0826a7c136d5e8aa6ed544636b458c501 100644 (file)
@@ -1909,7 +1909,7 @@ void CDir::_omap_commit(int op_prio)
 
     if (dn->last != CEPH_NOSNAP &&
        snaps && try_trim_snap_dentry(dn, *snaps)) {
-      dout(10) << " rm " << dn->name << " " << *dn << dendl;
+      dout(10) << " rm " << key << dendl;
       write_size += key.length();
       to_remove.insert(key);
       continue;