mirror of
https://github.com/ceph/ceph
synced 2025-01-10 05:00:59 +00:00
mds: avoid EXCL if mds_caps_wanted in _do_cap_update
The file_excl() trigger asserts mds_caps_wanted is empty. The caller shouldn't call it if that's the case. If it is, just go to LOCK instead. All we're doing is picking a state to move to that will allow us to update max_size. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
fa2c371f6e
commit
fc609846d4
@ -2343,7 +2343,8 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap,
|
||||
if (in->filelock.is_stable()) {
|
||||
bool need_issue = false;
|
||||
cap->inc_suppress();
|
||||
if (in->get_loner() >= 0 || (in->get_wanted_loner() >= 0 && in->try_set_loner())) {
|
||||
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!
|
||||
|
Loading…
Reference in New Issue
Block a user