]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix use-after-free bug in unmount() 3300/head
authorYan, Zheng <zyan@redhat.com>
Tue, 6 Jan 2015 12:17:28 +0000 (20:17 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 6 Jan 2015 12:22:36 +0000 (20:22 +0800)
If there is error, _release_fh() already outputs error message.
No need to print extra error message

Fixes: #10412
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/client/Client.cc

index 599673d9fbea76ba327a1ae2feea6c80ad1f4e25..9cbd1cf12ad383d581ce18bed4959498d20e3220 100644 (file)
@@ -4637,9 +4637,8 @@ void Client::unmount()
   while (!fd_map.empty()) {
     Fh *fh = fd_map.begin()->second;
     fd_map.erase(fd_map.begin());
-    int release_err = _release_fh(fh);
-    ldout(cct, 0) << " destroyed lost open file " << fh << " on " << *fh->inode << "(async_err = " << release_err << ")" << dendl;
-
+    ldout(cct, 0) << " destroyed lost open file " << fh << " on " << *fh->inode << dendl;
+    _release_fh(fh);
   }
 
   _ll_drop_pins();