diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2011-05-26 06:02:00 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-05-27 03:57:16 +0000 |
commit | d4ffff1fa9695c5b5c0bf337e208d8833b88ff2d (patch) | |
tree | acd4b6cfa7962a1cee7e9c81f11bd9ccb0d3ff24 /fs/cifs/connect.c | |
parent | 25c7f41e9234f60af30e086278f1de7974f8816f (diff) | |
download | op-kernel-dev-d4ffff1fa9695c5b5c0bf337e208d8833b88ff2d.zip op-kernel-dev-d4ffff1fa9695c5b5c0bf337e208d8833b88ff2d.tar.gz |
CIFS: Add rwpidforward mount option
Add rwpidforward mount option that switches on a mode when we forward
pid of a process who opened a file to any read and write operation.
This can prevent applications like WINE from failing on read or write
operation on a previously locked file region from the same netfd from
another process if we use mandatory brlock style.
It is actual for WINE because during a run of WINE program two processes
work on the same netfd - share the same file struct between several VFS
fds:
1) WINE-server does open and lock;
2) WINE-application does read and write.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 261ca81..21bc835 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1359,6 +1359,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, vol->server_ino = 1; } else if (strnicmp(data, "noserverino", 9) == 0) { vol->server_ino = 0; + } else if (strnicmp(data, "rwpidforward", 4) == 0) { + vol->rwpidforward = 1; } else if (strnicmp(data, "cifsacl", 7) == 0) { vol->cifs_acl = 1; } else if (strnicmp(data, "nocifsacl", 9) == 0) { @@ -2708,6 +2710,8 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info, cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NOSSYNC; if (pvolume_info->mand_lock) cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NOPOSIXBRL; + if (pvolume_info->rwpidforward) + cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_RWPIDFORWARD; if (pvolume_info->cifs_acl) cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_CIFS_ACL; if (pvolume_info->override_uid) |