]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] CIFS: New POSIX locking code not setting rc properly to zero on successful
authorSteve French <sfrench@us.ibm.com>
Thu, 21 Sep 2006 07:35:29 +0000 (07:35 +0000)
committerChris Wright <chrisw@sous-sol.org>
Sun, 19 Nov 2006 03:28:05 +0000 (19:28 -0800)
unlock in case where server does not support POSIX locks and nobrl is
not specified.

Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
fs/cifs/file.c

index e9c5ba9084fc6a477ea13fdd26c0a666ddebc2f3..ddb012a68023fe0818d50670f2fb81a990dbab56 100644 (file)
@@ -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);
                }
        }