Subject: [PATCH] mds: fix possible deadlock in multi-mds setup This should fix the file_excl case on a file_max update when there is more than one mds. If we dont issue caps here its possible when we eval_gather on the returning lockack that we don't push the lock forward which will leave the inode auth pinned. If an export occurs that tries to freeze a tree this inode is in, we'll have a freezing tree waiting for an auth_pin that can no longer be removed. Signed-off-by: Brandon Seibel --- src/mds/Locker.cc | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 3b9fbdc..6af959d 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -2665,8 +2665,7 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap, if (in->mds_caps_wanted.empty() && (in->get_loner() >= 0 || (in->get_wanted_loner() >= 0 && in->try_set_loner()))) { if (in->filelock.get_state() != LOCK_EXCL) - file_excl(&in->filelock, &need_issue); - need_issue = false; // loner! + file_excl(&in->filelock); } else simple_lock(&in->filelock, &need_issue); if (need_issue) -- 1.7.5.4