diff options
author | J. Bruce Fields <bfields@redhat.com> | 2010-10-30 17:31:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-30 21:08:15 -0400 |
commit | 05fa3135fdc7b9b510b502a35b6b97d2b38c6f48 (patch) | |
tree | d533e8112111202ae890b2061c0386669002d080 /fs/nfs | |
parent | 096657b65e1ac197e20be5ce7cff6b6ca2532787 (diff) |
locks: fix setlease methods to free passed-in lock
We modified setlease to require the caller to allocate the new lease in
the case of creating a new lease, but forgot to fix up the filesystem
methods.
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Steve French <sfrench@samba.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index e756075637b0..1e524fb73ba5 100644 --- 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) | |||
884 | dprintk("NFS: setlease(%s/%s, arg=%ld)\n", | 884 | dprintk("NFS: setlease(%s/%s, arg=%ld)\n", |
885 | file->f_path.dentry->d_parent->d_name.name, | 885 | file->f_path.dentry->d_parent->d_name.name, |
886 | file->f_path.dentry->d_name.name, arg); | 886 | file->f_path.dentry->d_name.name, arg); |
887 | 887 | if (arg != F_UNLCK) | |
888 | locks_free_lock(*fl); | ||
888 | return -EINVAL; | 889 | return -EINVAL; |
889 | } | 890 | } |