aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.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/locks.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/locks.c')
-rw-r--r--fs/locks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 63fbc41cc573..5b526a977882 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -186,7 +186,7 @@ void locks_release_private(struct file_lock *fl)
186EXPORT_SYMBOL_GPL(locks_release_private); 186EXPORT_SYMBOL_GPL(locks_release_private);
187 187
188/* Free a lock which is not in use. */ 188/* Free a lock which is not in use. */
189static void locks_free_lock(struct file_lock *fl) 189void locks_free_lock(struct file_lock *fl)
190{ 190{
191 BUG_ON(waitqueue_active(&fl->fl_wait)); 191 BUG_ON(waitqueue_active(&fl->fl_wait));
192 BUG_ON(!list_empty(&fl->fl_block)); 192 BUG_ON(!list_empty(&fl->fl_block));
@@ -195,6 +195,7 @@ static void locks_free_lock(struct file_lock *fl)
195 locks_release_private(fl); 195 locks_release_private(fl);
196 kmem_cache_free(filelock_cache, fl); 196 kmem_cache_free(filelock_cache, fl);
197} 197}
198EXPORT_SYMBOL(locks_free_lock);
198 199
199void locks_init_lock(struct file_lock *fl) 200void locks_init_lock(struct file_lock *fl)
200{ 201{