summaryrefslogtreecommitdiff
path: root/fs/locks.c
diff options
context:
space:
mode:
authoryangerkun <yangerkun@huawei.com>2020-06-01 17:16:16 +0800
committerJeff Layton <jlayton@kernel.org>2020-06-02 12:08:25 -0400
commit5ef159681309621aa8fe06d94397b85b51974d55 (patch)
treed75a6cc44416caeb49522c60ff673acb37ca4b7f /fs/locks.c
parent3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 (diff)
locks: add locks_move_blocks in posix_lock_inode
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>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/locks.c b/fs/locks.c
index b8a31c1c4fff..36bd2c221786 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -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);