From mboxrd@z Thu Jan 1 00:00:00 1970 From: Namhyung Kim Subject: [PATCH] locks: use assign_type() Date: Mon, 17 Jan 2011 15:45:59 +0900 Message-ID: <1295246759-5738-1-git-send-email-namhyung@gmail.com> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Alexander Viro , Matthew Wilcox Return-path: Received: from mail-iy0-f174.google.com ([209.85.210.174]:59005 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761Ab1AQGqI (ORCPT ); Mon, 17 Jan 2011 01:46:08 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Namhyung Kim --- fs/locks.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/fs/locks.c b/fs/locks.c index 0f3998291f78..2c2d3b804d62 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 -- 1.7.3.4.600.g982838b0