Skip to content

Commit f39b913

Browse files
author
Jeff Layton
committed
locks: pass correct "before" pointer to locks_unlink_lock in generic_add_lease
The argument to locks_unlink_lock can't be just any pointer to a pointer. It must be a pointer to the fl_next field in the previous lock in the list. Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Jeff Layton <jlayton@primarydata.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent 66f09ca commit f39b913

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/locks.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp
16191619
smp_mb();
16201620
error = check_conflicting_open(dentry, arg);
16211621
if (error)
1622-
locks_unlink_lock(flp);
1622+
locks_unlink_lock(before);
16231623
out:
16241624
if (is_deleg)
16251625
mutex_unlock(&inode->i_mutex);

0 commit comments

Comments
 (0)