aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2010-10-30 17:31:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-30 21:08:15 -0400
commit05fa3135fdc7b9b510b502a35b6b97d2b38c6f48 (patch)
treed533e8112111202ae890b2061c0386669002d080 /fs/cifs/cifsfs.c
parent096657b65e1ac197e20be5ce7cff6b6ca2532787 (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/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 75c4eaa79588..54745b6c3db9 100644
--- 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)
625 knows that the file won't be changed on the server 625 knows that the file won't be changed on the server
626 by anyone else */ 626 by anyone else */
627 return generic_setlease(file, arg, lease); 627 return generic_setlease(file, arg, lease);
628 else 628 else {
629 if (arg != F_UNLCK)
630 locks_free_lock(*lease);
629 return -EAGAIN; 631 return -EAGAIN;
632 }
630} 633}
631 634
632struct file_system_type cifs_fs_type = { 635struct file_system_type cifs_fs_type = {