struct cifs_credits credits_on_stack;
struct cifs_credits *credits = &credits_on_stack;
+ if (open_file->invalidHandle) {
+ rc = cifs_reopen_file(open_file, false);
+ if (rc == -EAGAIN)
+ continue;
+ else if (rc)
+ break;
+ }
+
rc = server->ops->wait_mtu_credits(server, cifs_sb->wsize,
&wsize, credits);
if (rc)
if (!rc) {
if (wdata->cfile->invalidHandle)
- rc = cifs_reopen_file(wdata->cfile, false);
-
- if (!rc)
+ rc = -EAGAIN;
+ else
rc = server->ops->async_writev(wdata,
cifs_uncached_writedata_release);
}
iov_iter_advance(&direct_iov, offset - ctx->pos);
do {
+ if (open_file->invalidHandle) {
+ rc = cifs_reopen_file(open_file, true);
+ if (rc == -EAGAIN)
+ continue;
+ else if (rc)
+ break;
+ }
+
rc = server->ops->wait_mtu_credits(server, cifs_sb->rsize,
&rsize, credits);
if (rc)
if (!rc) {
if (rdata->cfile->invalidHandle)
- rc = cifs_reopen_file(rdata->cfile, true);
-
- if (!rc)
+ rc = -EAGAIN;
+ else
rc = server->ops->async_readv(rdata);
}
struct cifs_credits credits_on_stack;
struct cifs_credits *credits = &credits_on_stack;
+ if (open_file->invalidHandle) {
+ rc = cifs_reopen_file(open_file, true);
+ if (rc == -EAGAIN)
+ continue;
+ else if (rc)
+ break;
+ }
+
rc = server->ops->wait_mtu_credits(server, cifs_sb->rsize,
&rsize, credits);
if (rc)
if (!rc) {
if (rdata->cfile->invalidHandle)
- rc = cifs_reopen_file(rdata->cfile, true);
-
- if (!rc)
+ rc = -EAGAIN;
+ else
rc = server->ops->async_readv(rdata);
}