diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-07-03 07:32:52 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-07-10 00:56:22 +0000 |
commit | b600fc854d2a813dc7cf08eb58590ada90db4c02 (patch) | |
tree | 7ddfd78ce312179e50d39fd1bbfdb439fab5df79 /http.c | |
parent | 013e903340a75b12523bd795d15fe5f23d725be9 (diff) | |
download | cmogstored-b600fc854d2a813dc7cf08eb58590ada90db4c02.tar.gz |
This allows us to avoid a redundant hash lookup every time we "activate" an open file for reading or writing.
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -160,11 +160,11 @@ static enum mog_next http_forward_in_progress(struct mog_fd *mfd, bool needq) { struct mog_http *http = &mfd->as.http; enum mog_http_method method = http->_p.http_method; - struct mog_dev *dev; if (needq) { - dev = mog_dev_for(http->svc, http->_p.mog_devid, false); - if (dev && !mog_ioq_ready(&dev->ioq, mfd)) + struct mog_file *file = &http->forward->as.file; + + if (file->ioq && !mog_ioq_ready(file->ioq, mfd)) /* no need to setup/stash rbuf, it's been done */ return MOG_NEXT_IGNORE; } |