Merge PR #39574 into master

* refs/pull/39574/head:
	client: wake up the front pos waiter

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2021-02-26 09:29:37 -08:00
commit f8398f56f8
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -9516,8 +9516,15 @@ void Client::lock_fh_pos(Fh *f)
void Client::unlock_fh_pos(Fh *f)
{
ceph_assert(ceph_mutex_is_locked_by_me(client_lock));
ldout(cct, 10) << __func__ << " " << f << dendl;
f->pos_locked = false;
if (!f->pos_waiters.empty()) {
// only wake up the oldest waiter
auto cond = f->pos_waiters.front();
cond->notify_one();
}
}
int Client::uninline_data(Inode *in, Context *onfinish)