Skip to content

Commit

Permalink
[CIFS] New POSIX locking code not setting rc properly to zero on succ…
Browse files Browse the repository at this point in the history
…essful

unlock in case where server does not support POSIX locks and nobrl is
not specified.

Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed Sep 21, 2006
1 parent 2fe87f0 commit 6b70c95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 6b70c95

Please sign in to comment.