mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andy Adamson <andros@citi.umich.edu>,
	Neil Brown <neilb@cse.unsw.edu.au>, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] knfsd: check for existence of file_lock parameter inside of the kernel lock.
Date: Fri, 7 Jan 2005 04:21:17 +0000	[thread overview]
Message-ID: <20050107042117.GQ27371@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <200501050742.j057gGvV013421@hera.kernel.org>

On Wed, Jan 05, 2005 at 05:48:59AM +0000, Linux Kernel Mailing List wrote:
> ChangeSet 1.2177, 2005/01/04 21:48:59-08:00, neilb@cse.unsw.edu.au
> 
> 	[PATCH] knfsd: check for existence of file_lock parameter inside of the kernel lock.

Why?  What is lock_kernel() protecting here?

> 	Signed-off-by: Andy Adamson <andros@citi.umich.edu>
> 	Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
> 	Signed-off-by: Andrew Morton <akpm@osdl.org>
> 	Signed-off-by: Linus Torvalds <torvalds@osdl.org>
> 
> 
> 
>  locks.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> 
> diff -Nru a/fs/locks.c b/fs/locks.c
> --- a/fs/locks.c	2005-01-04 23:42:28 -08:00
> +++ b/fs/locks.c	2005-01-04 23:42:28 -08:00
> @@ -1096,15 +1096,13 @@
>  */
>  void remove_lease(struct file_lock *fl)
>  {
> -	if (!IS_LEASE(fl))
> -		return;
> -
>  	lock_kernel();
> -
> +	if (!fl || !IS_LEASE(fl))
> +		goto out;
>  	fl->fl_type = F_UNLCK | F_INPROGRESS;
>  	fl->fl_break_time = jiffies - 10;
>  	time_out_leases(fl->fl_file->f_dentry->d_inode);
> -
> +out:
>  	unlock_kernel();
>  }
>  
> -
> To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

           reply	other threads:[~2005-01-07  4:21 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200501050742.j057gGvV013421@hera.kernel.org>]

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=20050107042117.GQ27371@parcelfarce.linux.theplanet.co.uk \
    --to=matthew@wil.cx \
    --cc=akpm@osdl.org \
    --cc=andros@citi.umich.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®