mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-15 19:56:03 +00:00
locks: consolidate checks for compatible filp->f_mode values in setlk handlers
Move this check into flock64_to_posix_lock instead of duplicating it in two places. This also fixes a minor wart in the code where we continue referring to the struct flock after converting it to struct file_lock. Acked-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Jeff Layton <jlayton@redhat.com>
This commit is contained in:
parent
ef12e72a01
commit
bce7560d49
1 changed files with 12 additions and 34 deletions
46
fs/locks.c
46
fs/locks.c
Loading…
Add table
Add a link
Reference in a new issue