Fix error handling in afs_req_issue_op() by calling
netfs_subreq_terminated() rather than simply storing the error in
subreq->error. The netfs function must be called to wake up anyone
waiting.
Fixes: 751551a7a74a ("afs: Use new fscache read helper API")
Signed-off-by: David Howells <dhowells@redhat.com>
int ret;
fsreq = afs_alloc_read(GFP_NOFS);
- if (!fsreq) {
- subreq->error = -ENOMEM;
- return;
- }
+ if (!fsreq)
+ return netfs_subreq_terminated(subreq, -ENOMEM);
fsreq->subreq = subreq;
fsreq->pos = subreq->start + subreq->transferred;
ret = afs_fetch_data(fsreq->vnode, fsreq);
if (ret < 0)
- subreq->error = ret;
+ return netfs_subreq_terminated(subreq, ret);
}
static int afs_symlink_readpage(struct page *page)