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
/
nfs
/
file.c
diff --git
a/fs/nfs/file.c
b/fs/nfs/file.c
index e756075637b005ba1937b275c2d77ed3ff8ad676..1e524fb73ba56200be86a3675181c78d7bd02fde 100644
(file)
--- a/
fs/nfs/file.c
+++ b/
fs/nfs/file.c
@@
-884,6
+884,7
@@
static int nfs_setlease(struct file *file, long arg, struct file_lock **fl)
dprintk("NFS: setlease(%s/%s, arg=%ld)\n",
file->f_path.dentry->d_parent->d_name.name,
file->f_path.dentry->d_name.name, arg);
-
+ if (arg != F_UNLCK)
+ locks_free_lock(*fl);
return -EINVAL;
}