Commit 255acbf7 authored by Pavel Shilovsky's avatar Pavel Shilovsky

Fix pid-forward in cifs_writepages for 2.6.24

parent b3038798
...@@ -1390,15 +1390,15 @@ retry: ...@@ -1390,15 +1390,15 @@ retry:
* we used to still be valid * we used to still be valid
*/ */
open_file = find_writable_file(CIFS_I(mapping->host)); open_file = find_writable_file(CIFS_I(mapping->host));
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_WINE_MODE)
netpid = open_file->pid;
else
netpid = current->tgid;
if (!open_file) { if (!open_file) {
cERROR(1, ("No writable handles for inode")); cERROR(1, ("No writable handles for inode"));
rc = -EBADF; rc = -EBADF;
} else { } else {
if (cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_WINE_MODE)
netpid = open_file->pid;
else
netpid = current->tgid;
rc = CIFSSMBWrite2(xid, cifs_sb->tcon, rc = CIFSSMBWrite2(xid, cifs_sb->tcon,
open_file->netfid, netpid, open_file->netfid, netpid,
bytes_to_write, offset, bytes_to_write, offset,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment