summaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/locks.c b/fs/locks.c
index eaa1cfaf73b0..71d0c6c2aac5 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1160,6 +1160,11 @@ static int posix_lock_inode(struct inode *inode, struct file_lock *request,
1160 */ 1160 */
1161 error = -EDEADLK; 1161 error = -EDEADLK;
1162 spin_lock(&blocked_lock_lock); 1162 spin_lock(&blocked_lock_lock);
1163 /*
1164 * Ensure that we don't find any locks blocked on this
1165 * request during deadlock detection.
1166 */
1167 __locks_wake_up_blocks(request);
1163 if (likely(!posix_locks_deadlock(request, fl))) { 1168 if (likely(!posix_locks_deadlock(request, fl))) {
1164 error = FILE_LOCK_DEFERRED; 1169 error = FILE_LOCK_DEFERRED;
1165 __locks_insert_block(fl, request, 1170 __locks_insert_block(fl, request,