Skip to content

Commit 2a9f369

Browse files
committed
Merge PR ceph#53822 into main
* refs/pull/53822/head: CLIENT: C_Read_Async_Finisher should assume client_lock is held Reviewed-by: Venky Shankar <[email protected]>
2 parents 89b644d + 9a083b0 commit 2a9f369

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/client/Client.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11003,15 +11003,11 @@ void Client::do_readahead(Fh *f, Inode *in, uint64_t off, uint64_t len)
1100311003

1100411004
void Client::C_Read_Async_Finisher::finish(int r)
1100511005
{
11006-
clnt->client_lock.lock();
11007-
1100811006
// Do read ahead as long as we aren't completing with 0 bytes
1100911007
if (r != 0)
1101011008
clnt->do_readahead(f, in, off, len);
1101111009

1101211010
onfinish->complete(r);
11013-
11014-
clnt->client_lock.unlock();
1101511011
}
1101611012

1101711013
int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
@@ -11043,9 +11039,7 @@ int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
1104311039
Context *crf = io_finish.release();
1104411040

1104511041
// Complete the crf immediately with 0 bytes
11046-
client_lock.unlock();
1104711042
crf->complete(0);
11048-
client_lock.lock();
1104911043

1105011044
// Signal async completion
1105111045
return 0;
@@ -11077,9 +11071,7 @@ int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
1107711071
Context *crf = io_finish.release();
1107811072
if (r != 0) {
1107911073
// need to do readahead, so complete the crf
11080-
client_lock.unlock();
1108111074
crf->complete(r);
11082-
client_lock.lock();
1108311075
} else {
1108411076
get_cap_ref(in, CEPH_CAP_FILE_CACHE);
1108511077
}

0 commit comments

Comments
 (0)