aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-23 14:40:55 -0400
committerJeff Layton <jlayton@redhat.com>2012-03-23 14:40:55 -0400
commitfe5f5d2e908957392aebbb852a6fb22885860d4b (patch)
treeac9b490eebb50463a14cda8b8bfc654aef78265d /fs/cifs
parentda472fc847e9d8c9da69b09ce0ab975b24f9b894 (diff)
cifs: add pid field to cifs_writedata
We'll need this to handle rwpidforward option correctly when we use async writes in the aio_write op. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsproto.h1
-rw-r--r--fs/cifs/cifssmb.c4
-rw-r--r--fs/cifs/file.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 95ee5a64e0b..9e68340c730 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -487,6 +487,7 @@ struct cifs_writedata {
struct work_struct work;
struct cifsFileInfo *cfile;
__u64 offset;
+ pid_t pid;
unsigned int bytes;
int result;
unsigned int nr_pages;
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 76d8981736e..61922142cf0 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2166,8 +2166,8 @@ cifs_async_writev(struct cifs_writedata *wdata)
goto async_writev_out;
}
- smb->hdr.Pid = cpu_to_le16((__u16)wdata->cfile->pid);
- smb->hdr.PidHigh = cpu_to_le16((__u16)(wdata->cfile->pid >> 16));
+ smb->hdr.Pid = cpu_to_le16((__u16)wdata->pid);
+ smb->hdr.PidHigh = cpu_to_le16((__u16)(wdata->pid >> 16));
smb->AndXCommand = 0xFF; /* none */
smb->Fid = wdata->cfile->netfid;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 159fcc56dc2..5fedf6cb5a5 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1802,6 +1802,7 @@ retry:
rc = -EBADF;
break;
}
+ wdata->pid = wdata->cfile->pid;
rc = cifs_async_writev(wdata);
} while (wbc->sync_mode == WB_SYNC_ALL && rc == -EAGAIN);