diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/locks.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/locks.c b/fs/locks.c index 4d9e71d43e7e..8fcfeb177a2a 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -168,18 +168,9 @@ static void locks_release_private(struct file_lock *fl) | |||
168 | /* Free a lock which is not in use. */ | 168 | /* Free a lock which is not in use. */ |
169 | static void locks_free_lock(struct file_lock *fl) | 169 | static void locks_free_lock(struct file_lock *fl) |
170 | { | 170 | { |
171 | if (fl == NULL) { | 171 | BUG_ON(waitqueue_active(&fl->fl_wait)); |
172 | BUG(); | 172 | BUG_ON(!list_empty(&fl->fl_block)); |
173 | return; | 173 | BUG_ON(!list_empty(&fl->fl_link)); |
174 | } | ||
175 | if (waitqueue_active(&fl->fl_wait)) | ||
176 | panic("Attempting to free lock with active wait queue"); | ||
177 | |||
178 | if (!list_empty(&fl->fl_block)) | ||
179 | panic("Attempting to free lock with active block list"); | ||
180 | |||
181 | if (!list_empty(&fl->fl_link)) | ||
182 | panic("Attempting to free lock on active lock list"); | ||
183 | 174 | ||
184 | locks_release_private(fl); | 175 | locks_release_private(fl); |
185 | kmem_cache_free(filelock_cache, fl); | 176 | kmem_cache_free(filelock_cache, fl); |