diff options
author | Steve French <sfrench@us.ibm.com> | 2006-09-21 03:35:29 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-09-21 03:35:29 -0400 |
commit | 6b70c9559bcf381a6521e38b0dd5d3d4d905868a (patch) | |
tree | 2165ddc6fa0d7677b00fdee6265271ac29024df6 /fs/cifs | |
parent | 2fe87f02a04ad6e7075023a87fe38eb458a4bb9d (diff) |
[CIFS] New POSIX locking code not setting rc properly to zero on successful
unlock in case where server does not support POSIX locks and nobrl is
not specified.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index e9c5ba9084fc..ddb012a68023 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -752,6 +752,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
752 | int stored_rc = 0; | 752 | int stored_rc = 0; |
753 | struct cifsLockInfo *li, *tmp; | 753 | struct cifsLockInfo *li, *tmp; |
754 | 754 | ||
755 | rc = 0; | ||
755 | down(&fid->lock_sem); | 756 | down(&fid->lock_sem); |
756 | list_for_each_entry_safe(li, tmp, &fid->llist, llist) { | 757 | list_for_each_entry_safe(li, tmp, &fid->llist, llist) { |
757 | if (pfLock->fl_start <= li->offset && | 758 | if (pfLock->fl_start <= li->offset && |
@@ -766,7 +767,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
766 | kfree(li); | 767 | kfree(li); |
767 | } | 768 | } |
768 | } | 769 | } |
769 | up(&fid->lock_sem); | 770 | up(&fid->lock_sem); |
770 | } | 771 | } |
771 | } | 772 | } |
772 | 773 | ||