From: xie xingguo Date: Fri, 17 Jun 2016 08:13:31 +0000 (+0800) Subject: mds/CInode: fix potential fin hanging X-Git-Tag: ses5-milestone5~584^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b653e7d706231ff1b736a64b68b05a777cbeff35;p=ceph.git mds/CInode: fix potential fin hanging The behaviour of handle_write_error() process is configurable and therefore is non-deterministic. Thus we'd better to finish the context here anyway. Signed-off-by: xie xingguo --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index ea58d383153..95027555366 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -995,6 +995,7 @@ void CInode::_stored(int r, version_t v, Context *fin) mdcache->mds->clog->error() << "failed to store ino " << ino() << " object," << " errno " << r << "\n"; mdcache->mds->handle_write_error(r); + fin->complete(r); return; } @@ -1211,6 +1212,8 @@ void CInode::_stored_backtrace(int r, version_t v, Context *fin) << ", pool " << get_backtrace_pool() << ", errno " << r << "\n"; mdcache->mds->handle_write_error(r); + if (fin) + fin->complete(r); return; }