lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110118233051.GI10903@fieldses.org>
Date:	Tue, 18 Jan 2011 18:30:51 -0500
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Namhyung Kim <namhyung@...il.com>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	Matthew Wilcox <matthew@....cx>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] locks: use assign_type()

Looks right to me.

I suppose I'll queue this up in the nfsd tree if nobody else takes
it.

--b.

On Mon, Jan 17, 2011 at 03:45:59PM +0900, Namhyung Kim wrote:
> Signed-off-by: Namhyung Kim <namhyung@...il.com>
> ---
>  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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ