]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
cifs: add pid field to cifs_writedata
authorJeff Layton <jlayton@redhat.com>
Fri, 23 Mar 2012 18:40:55 +0000 (14:40 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 23 Mar 2012 18:40:55 +0000 (14:40 -0400)
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>
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/file.c

index 95ee5a64e0b0b247e33e4c11566a3b68216b9c51..9e68340c7306e9caed0962661b05410ac59b3c5c 100644 (file)
@@ -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;
index 76d8981736e1439abf61956e0e0e3a659551b666..61922142cf0d55602f2ef62eb58f900054fb679d 100644 (file)
@@ -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;
index 159fcc56dc2d4c4f7ae4ac80e110cc59140f6001..5fedf6cb5a5673ce26a08edbf1bd4b8d32bd3796 100644 (file)
@@ -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);