X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Flocks.c;h=0a4f50dfadfbf672ff3bc0bcba0581a3e94b83bb;hb=7e3bf1d3308934bc1b8ca492f473e0e22a95da7e;hp=822c3d1843af732934c9a393ffe8a51a0f7ff73f;hpb=4e76ae4406449811c0b743ccf0612ef6ffcf2acb;p=pandora-kernel.git diff --git a/fs/locks.c b/fs/locks.c index 822c3d1843af..0a4f50dfadfb 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -414,17 +414,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