linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Matthew Wilcox <matthew@wil.cx>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] locks: use assign_type()
Date: Tue, 18 Jan 2011 18:30:51 -0500	[thread overview]
Message-ID: <20110118233051.GI10903@fieldses.org> (raw)
In-Reply-To: <1295246759-5738-1-git-send-email-namhyung@gmail.com>

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@gmail.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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2011-01-18 23:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17  6:45 [PATCH] locks: use assign_type() Namhyung Kim
2011-01-18 23:30 ` J. Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110118233051.GI10903@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=namhyung@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).