Skip to content

Commit

Permalink
locks: use assign_type()
Browse files Browse the repository at this point in the history
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Namhyung Kim authored and J. Bruce Fields committed Mar 7, 2011
1 parent dd9c154 commit f32cb53
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f32cb53

Please sign in to comment.