Merge tag 'filelock-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Aug 2020 17:46:41 +0000 (10:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Aug 2020 17:46:41 +0000 (10:46 -0700)
Pull file locking fix from Jeff Layton:
 "Just a single, one-line patch to fix an inefficiency in the posix
  locking code that can lead to it doing more wakeups than necessary"

* tag 'filelock-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
  locks: add locks_move_blocks in posix_lock_inode

fs/locks.c

index 7df0f9fa66f48a24b752934f632817814b331d12..938fe325bc54318167ff35ad8d54317c33b2ddfc 100644 (file)
@@ -1282,6 +1282,7 @@ static int posix_lock_inode(struct inode *inode, struct file_lock *request,
                                if (!new_fl)
                                        goto out;
                                locks_copy_lock(new_fl, request);
+                               locks_move_blocks(new_fl, request);
                                request = new_fl;
                                new_fl = NULL;
                                locks_insert_lock_ctx(request, &fl->fl_list);