Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339466
b: refs/heads/master
c: 21cb2d9
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Dec 5, 2012
1 parent 0b53f79 commit 829d331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f152fd5fffa78910c467b17f12d0aa060aa408a6
refs/heads/master: 21cb2d90c76cbc951da3a266f0dd439d64f3114a
8 changes: 5 additions & 3 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,16 +1443,18 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type,
return -ENOMEM;

rc = cifs_lock_add_if(cfile, lock, wait_flag);
if (rc < 0)
if (rc < 0) {
kfree(lock);
if (rc <= 0)
return rc;
}
if (!rc)
goto out;

rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
type, 1, 0, wait_flag);
if (rc) {
kfree(lock);
goto out;
return rc;
}

cifs_lock_add(cfile, lock);
Expand Down

0 comments on commit 829d331

Please sign in to comment.