projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
locks: fix setlease methods to free passed-in lock
[linux-2.6-block.git]
/
fs
/
cifs
/
cifsfs.c
diff --git
a/fs/cifs/cifsfs.c
b/fs/cifs/cifsfs.c
index 75c4eaa7958821483c6829658ab6469a8ad8c152..54745b6c3db9c50af75b393c8b80d96460439c80 100644
(file)
--- a/
fs/cifs/cifsfs.c
+++ b/
fs/cifs/cifsfs.c
@@
-625,8
+625,11
@@
static int cifs_setlease(struct file *file, long arg, struct file_lock **lease)
knows that the file won't be changed on the server
by anyone else */
return generic_setlease(file, arg, lease);
- else
+ else {
+ if (arg != F_UNLCK)
+ locks_free_lock(*lease);
return -EAGAIN;
+ }
}
struct file_system_type cifs_fs_type = {