summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
authorPavel Shilovsky2012-09-19 15:22:44 +0200
committerSteve French2012-09-25 04:46:33 +0200
commit579f9053236c796d718162c37c72bb3bd32d008c (patch)
tree4de2901dcba0a49b782068b70b5b28df90b20f4b /fs/cifs/cifsproto.h
parentCIFS: Turn lock mutex into rw semaphore (diff)
downloadkernel-qcow2-linux-579f9053236c796d718162c37c72bb3bd32d008c.tar.gz
kernel-qcow2-linux-579f9053236c796d718162c37c72bb3bd32d008c.tar.xz
kernel-qcow2-linux-579f9053236c796d718162c37c72bb3bd32d008c.zip
CIFS: Check for mandatory brlocks on read/write
Currently CIFS code accept read/write ops on mandatory locked area when two processes use the same file descriptor - it's wrong. Fix this by serializing io and brlock operations on the inode. Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 15e38dc389fc..c758ee7b0307 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -180,6 +180,10 @@ extern struct smb_vol *cifs_get_volume_info(char *mount_data,
extern int cifs_mount(struct cifs_sb_info *, struct smb_vol *);
extern void cifs_umount(struct cifs_sb_info *);
extern void cifs_mark_open_files_invalid(struct cifs_tcon *tcon);
+extern bool cifs_find_lock_conflict(struct cifsFileInfo *cfile, __u64 offset,
+ __u64 length, __u8 type,
+ struct cifsLockInfo **conf_lock,
+ bool rw_check);
#if IS_ENABLED(CONFIG_CIFS_DFS_UPCALL)
extern void cifs_dfs_release_automount_timer(void);