]> git.baikalelectronics.ru Git - kernel.git/commit
locks: consolidate checks for compatible filp->f_mode values in setlk handlers
authorJeff Layton <jlayton@redhat.com>
Mon, 3 Feb 2014 17:13:08 +0000 (12:13 -0500)
committerJeff Layton <jlayton@redhat.com>
Mon, 31 Mar 2014 12:24:42 +0000 (08:24 -0400)
commit7a8df2e6df41a96567a66d5630902d937d52f866
tree548ef2a83300ee6c4fede7a20be30aee13b9ca5f
parent3ef2e0dfd4c2ef718ab543e924afa4bc952d4272
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>
fs/locks.c