From: Namhyung Kim Date: Mon, 17 Jan 2011 06:45:59 +0000 (+0900) Subject: locks: use assign_type() X-Git-Tag: v2.6.39-rc1~93^2~15 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f32cb53219a956b96a4cd1ee7c6b1b8a48d40e9f;p=~emulex%2Finfiniband.git locks: use assign_type() Signed-off-by: Namhyung Kim Signed-off-by: J. Bruce Fields --- diff --git a/fs/locks.c b/fs/locks.c index 0f3998291f7..2c2d3b804d6 100644 --- a/fs/locks.c +++ b/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