summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-09-21 09:35:29 +0200
committerSteve French <sfrench@us.ibm.com>2006-09-21 09:35:29 +0200
commit6b70c9559bcf381a6521e38b0dd5d3d4d905868a (patch)
tree2165ddc6fa0d7677b00fdee6265271ac29024df6 /fs/cifs
parent[CIFS] Support deep tree mounts (e.g. mounts to //server/share/path) (diff)
downloadlinux-6b70c9559bcf381a6521e38b0dd5d3d4d905868a.tar.xz
linux-6b70c9559bcf381a6521e38b0dd5d3d4d905868a.zip
[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.c3
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)
int stored_rc = 0;
struct cifsLockInfo *li, *tmp;
+ rc = 0;
down(&fid->lock_sem);
list_for_each_entry_safe(li, tmp, &fid->llist, llist) {
if (pfLock->fl_start <= li->offset &&
@@ -766,7 +767,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
kfree(li);
}
}
- up(&fid->lock_sem);
+ up(&fid->lock_sem);
}
}