diff options
-rw-r--r-- | fs/cifs/CHANGES | 5 | ||||
-rw-r--r-- | fs/cifs/file.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index bed6215c0794..41e3b6a9397c 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -6,7 +6,10 @@ done with "serverino" mount option). Add support for POSIX Unlink | |||
6 | Samba supports newer POSIX CIFS Protocol Extensions). Add "nounix" | 6 | Samba supports newer POSIX CIFS Protocol Extensions). Add "nounix" |
7 | mount option to allow disabling the CIFS Unix Extensions for just | 7 | mount option to allow disabling the CIFS Unix Extensions for just |
8 | that mount. Fix hang on spinlock in find_writable_file (race when | 8 | that mount. Fix hang on spinlock in find_writable_file (race when |
9 | reopening file after session crash). | 9 | reopening file after session crash). Byte range unlock request to |
10 | windows server could unlock more bytes (on server copy of file) | ||
11 | than intended if start of unlock request is well before start of | ||
12 | a previous byte range lock that we issued. | ||
10 | 13 | ||
11 | Version 1.49 | 14 | Version 1.49 |
12 | ------------ | 15 | ------------ |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 894b1f7b299d..f9bd8b83f40e 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -767,7 +767,8 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
767 | mutex_lock(&fid->lock_mutex); | 767 | mutex_lock(&fid->lock_mutex); |
768 | list_for_each_entry_safe(li, tmp, &fid->llist, llist) { | 768 | list_for_each_entry_safe(li, tmp, &fid->llist, llist) { |
769 | if (pfLock->fl_start <= li->offset && | 769 | if (pfLock->fl_start <= li->offset && |
770 | length >= li->length) { | 770 | (pflock->fl_start + length) >= |
771 | (li->offset + li->length)) { | ||
771 | stored_rc = CIFSSMBLock(xid, pTcon, | 772 | stored_rc = CIFSSMBLock(xid, pTcon, |
772 | netfid, | 773 | netfid, |
773 | li->length, li->offset, | 774 | li->length, li->offset, |