linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] knfsd: check for existence of file_lock parameter inside of the kernel lock.
       [not found] <200501050742.j057gGvV013421@hera.kernel.org>
@ 2005-01-07  4:21 ` Matthew Wilcox
  0 siblings, 0 replies; only message in thread
From: Matthew Wilcox @ 2005-01-07  4:21 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Andy Adamson, Neil Brown, Andrew Morton, Linus Torvalds

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-07  4:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200501050742.j057gGvV013421@hera.kernel.org>
2005-01-07  4:21 ` [PATCH] knfsd: check for existence of file_lock parameter inside of the kernel lock Matthew Wilcox

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).