Skip to content
Commit d6367d62 authored by NeilBrown's avatar NeilBrown Committed by Jeff Layton
Browse files

fs/locks: use properly initialized file_lock when unlocking.



Both locks_remove_posix() and locks_remove_flock() use a
struct file_lock without calling locks_init_lock() on it.
This means the various list_heads are not initialized, which
will become a problem with a later patch.

So change them both to initialize properly.  For flock locks,
this involves using flock_make_lock(), and changing it to
allow a file_lock to be passed in, so memory allocation isn't
always needed.

Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Reviewed-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
parent 4316c3c6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment