locks: add locks_move_blocks in posix_lock_inode
authoryangerkun <yangerkun@huawei.com>
Mon, 1 Jun 2020 09:16:16 +0000 (17:16 +0800)
committerJeff Layton <jlayton@kernel.org>
Tue, 2 Jun 2020 16:08:25 +0000 (12:08 -0400)
We forget to call locks_move_blocks in posix_lock_inode when try to
process same owner and different types.

Signed-off-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/locks.c

index b8a31c1c4fff3c2a4e35c57a953d9bf025569a4b..36bd2c22178644190beded057fe48a753b49ae1f 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);