Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308792
b: refs/heads/master
c: 2a1bb13
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed May 17, 2012
1 parent 57d8251 commit 74b31cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6993f74a5bf836210e7f253d5ad3f76d73a95f51
refs/heads/master: 2a1bb13853300bbb5a58eab006189d2c0dc215a0
27 changes: 18 additions & 9 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,23 @@ cifs_readdata_release(struct kref *refcount)
kfree(rdata);
}

static int
cifs_retry_async_readv(struct cifs_readdata *rdata)
{
int rc;

do {
if (rdata->cfile->invalidHandle) {
rc = cifs_reopen_file(rdata->cfile, true);
if (rc != 0)
continue;
}
rc = cifs_async_readv(rdata);
} while (rc == -EAGAIN);

return rc;
}

static ssize_t
cifs_iovec_read(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *poffset)
Expand Down Expand Up @@ -2852,15 +2869,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
rdata->marshal_iov = cifs_readpages_marshal_iov;
list_splice_init(&tmplist, &rdata->pages);

do {
if (open_file->invalidHandle) {
rc = cifs_reopen_file(open_file, true);
if (rc != 0)
continue;
}
rc = cifs_async_readv(rdata);
} while (rc == -EAGAIN);

rc = cifs_retry_async_readv(rdata);
if (rc != 0) {
list_for_each_entry_safe(page, tpage, &rdata->pages,
lru) {
Expand Down

0 comments on commit 74b31cf

Please sign in to comment.