diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsglob.h | 3 | ||||
-rw-r--r-- | fs/cifs/file.c | 8 | ||||
-rw-r--r-- | fs/cifs/smb1ops.c | 1 | ||||
-rw-r--r-- | fs/cifs/smb2maperror.c | 3 |
4 files changed, 13 insertions, 2 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index e5cb1941e251..fcf81c05635f 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -172,6 +172,7 @@ struct dfs_info3_param; | |||
172 | struct cifs_fattr; | 172 | struct cifs_fattr; |
173 | struct smb_vol; | 173 | struct smb_vol; |
174 | struct cifs_fid; | 174 | struct cifs_fid; |
175 | struct cifs_readdata; | ||
175 | 176 | ||
176 | struct smb_version_operations { | 177 | struct smb_version_operations { |
177 | int (*send_cancel)(struct TCP_Server_Info *, void *, | 178 | int (*send_cancel)(struct TCP_Server_Info *, void *, |
@@ -280,6 +281,8 @@ struct smb_version_operations { | |||
280 | int (*close)(const unsigned int, struct cifs_tcon *, struct cifs_fid *); | 281 | int (*close)(const unsigned int, struct cifs_tcon *, struct cifs_fid *); |
281 | /* send a flush request to the server */ | 282 | /* send a flush request to the server */ |
282 | int (*flush)(const unsigned int, struct cifs_tcon *, struct cifs_fid *); | 283 | int (*flush)(const unsigned int, struct cifs_tcon *, struct cifs_fid *); |
284 | /* async read from the server */ | ||
285 | int (*async_readv)(struct cifs_readdata *); | ||
283 | }; | 286 | }; |
284 | 287 | ||
285 | struct smb_version_values { | 288 | struct smb_version_values { |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index aa1dccf0df9e..ec7c2e6bcbdf 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -2488,6 +2488,9 @@ static int | |||
2488 | cifs_retry_async_readv(struct cifs_readdata *rdata) | 2488 | cifs_retry_async_readv(struct cifs_readdata *rdata) |
2489 | { | 2489 | { |
2490 | int rc; | 2490 | int rc; |
2491 | struct TCP_Server_Info *server; | ||
2492 | |||
2493 | server = tlink_tcon(rdata->cfile->tlink)->ses->server; | ||
2491 | 2494 | ||
2492 | do { | 2495 | do { |
2493 | if (rdata->cfile->invalidHandle) { | 2496 | if (rdata->cfile->invalidHandle) { |
@@ -2495,7 +2498,7 @@ cifs_retry_async_readv(struct cifs_readdata *rdata) | |||
2495 | if (rc != 0) | 2498 | if (rc != 0) |
2496 | continue; | 2499 | continue; |
2497 | } | 2500 | } |
2498 | rc = cifs_async_readv(rdata); | 2501 | rc = server->ops->async_readv(rdata); |
2499 | } while (rc == -EAGAIN); | 2502 | } while (rc == -EAGAIN); |
2500 | 2503 | ||
2501 | return rc; | 2504 | return rc; |
@@ -2647,6 +2650,9 @@ cifs_iovec_read(struct file *file, const struct iovec *iov, | |||
2647 | open_file = file->private_data; | 2650 | open_file = file->private_data; |
2648 | tcon = tlink_tcon(open_file->tlink); | 2651 | tcon = tlink_tcon(open_file->tlink); |
2649 | 2652 | ||
2653 | if (!tcon->ses->server->ops->async_readv) | ||
2654 | return -ENOSYS; | ||
2655 | |||
2650 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD) | 2656 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD) |
2651 | pid = open_file->pid; | 2657 | pid = open_file->pid; |
2652 | else | 2658 | else |
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index 7e8a2bdd69c8..e2dbd22cb136 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c | |||
@@ -785,6 +785,7 @@ struct smb_version_operations smb1_operations = { | |||
785 | .set_fid = cifs_set_fid, | 785 | .set_fid = cifs_set_fid, |
786 | .close = cifs_close_file, | 786 | .close = cifs_close_file, |
787 | .flush = cifs_flush_file, | 787 | .flush = cifs_flush_file, |
788 | .async_readv = cifs_async_readv, | ||
788 | }; | 789 | }; |
789 | 790 | ||
790 | struct smb_version_values smb1_values = { | 791 | struct smb_version_values smb1_values = { |
diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c index be41478acc05..eaf5466d4041 100644 --- a/fs/cifs/smb2maperror.c +++ b/fs/cifs/smb2maperror.c | |||
@@ -2455,7 +2455,8 @@ map_smb2_to_linux_error(char *buf, bool log_err) | |||
2455 | return 0; | 2455 | return 0; |
2456 | 2456 | ||
2457 | /* mask facility */ | 2457 | /* mask facility */ |
2458 | if (log_err && (smb2err != (STATUS_MORE_PROCESSING_REQUIRED))) | 2458 | if (log_err && (smb2err != STATUS_MORE_PROCESSING_REQUIRED) && |
2459 | (smb2err != STATUS_END_OF_FILE)) | ||
2459 | smb2_print_status(smb2err); | 2460 | smb2_print_status(smb2err); |
2460 | else if (cifsFYI & CIFS_RC) | 2461 | else if (cifsFYI & CIFS_RC) |
2461 | smb2_print_status(smb2err); | 2462 | smb2_print_status(smb2err); |