提交 6b70c955 编写于 作者: S Steve French

[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: NSteve French <sfrench@us.ibm.com>
上级 2fe87f02
...@@ -752,6 +752,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) ...@@ -752,6 +752,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
int stored_rc = 0; int stored_rc = 0;
struct cifsLockInfo *li, *tmp; struct cifsLockInfo *li, *tmp;
rc = 0;
down(&fid->lock_sem); down(&fid->lock_sem);
list_for_each_entry_safe(li, tmp, &fid->llist, llist) { list_for_each_entry_safe(li, tmp, &fid->llist, llist) {
if (pfLock->fl_start <= li->offset && if (pfLock->fl_start <= li->offset &&
...@@ -766,7 +767,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) ...@@ -766,7 +767,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
kfree(li); kfree(li);
} }
} }
up(&fid->lock_sem); up(&fid->lock_sem);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册