mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
locks: use assign_type()
Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
dd9c1549ed
commit
f32cb53219
12
fs/locks.c
12
fs/locks.c
@ -415,17 +415,7 @@ static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl,
|
||||
fl->fl_ops = NULL;
|
||||
fl->fl_lmops = NULL;
|
||||
|
||||
switch (l->l_type) {
|
||||
case F_RDLCK:
|
||||
case F_WRLCK:
|
||||
case F_UNLCK:
|
||||
fl->fl_type = l->l_type;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return assign_type(fl, l->l_type);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user