Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326263
b: refs/heads/master
c: fc9c596
h: refs/heads/master
i:
  326261: 0537c85
  326259: aa2f738
  326255: 57b97fe
v: v3
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Sep 25, 2012
1 parent ffe85a7 commit a5882c7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 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: 3a3bab509f3f0e7295caab24e9102ce303edb50b
refs/heads/master: fc9c59662e0cd37577556d0de865268baeb9b293
3 changes: 3 additions & 0 deletions trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ struct dfs_info3_param;
struct cifs_fattr;
struct smb_vol;
struct cifs_fid;
struct cifs_readdata;

struct smb_version_operations {
int (*send_cancel)(struct TCP_Server_Info *, void *,
Expand Down Expand Up @@ -280,6 +281,8 @@ struct smb_version_operations {
int (*close)(const unsigned int, struct cifs_tcon *, struct cifs_fid *);
/* send a flush request to the server */
int (*flush)(const unsigned int, struct cifs_tcon *, struct cifs_fid *);
/* async read from the server */
int (*async_readv)(struct cifs_readdata *);
};

struct smb_version_values {
Expand Down
8 changes: 7 additions & 1 deletion trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2488,14 +2488,17 @@ static int
cifs_retry_async_readv(struct cifs_readdata *rdata)
{
int rc;
struct TCP_Server_Info *server;

server = tlink_tcon(rdata->cfile->tlink)->ses->server;

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

return rc;
Expand Down Expand Up @@ -2647,6 +2650,9 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
open_file = file->private_data;
tcon = tlink_tcon(open_file->tlink);

if (!tcon->ses->server->ops->async_readv)
return -ENOSYS;

if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD)
pid = open_file->pid;
else
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/cifs/smb1ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ struct smb_version_operations smb1_operations = {
.set_fid = cifs_set_fid,
.close = cifs_close_file,
.flush = cifs_flush_file,
.async_readv = cifs_async_readv,
};

struct smb_version_values smb1_values = {
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/cifs/smb2maperror.c
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,8 @@ map_smb2_to_linux_error(char *buf, bool log_err)
return 0;

/* mask facility */
if (log_err && (smb2err != (STATUS_MORE_PROCESSING_REQUIRED)))
if (log_err && (smb2err != STATUS_MORE_PROCESSING_REQUIRED) &&
(smb2err != STATUS_END_OF_FILE))
smb2_print_status(smb2err);
else if (cifsFYI & CIFS_RC)
smb2_print_status(smb2err);
Expand Down

0 comments on commit a5882c7

Please sign in to comment.