From: Steve French Date: Thu, 21 Sep 2006 07:35:29 +0000 (+0000) Subject: [PATCH] CIFS: New POSIX locking code not setting rc properly to zero on successful X-Git-Tag: v2.6.18.3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d20d58437de6f288c8511475355665cac777bbb5;p=thirdparty%2Fkernel%2Fstable.git [PATCH] 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 Signed-off-by: Chris Wright --- diff --git a/fs/cifs/file.c b/fs/cifs/file.c index e9c5ba9084fc6..ddb012a68023f 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); } }