From: NeilBrown Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 25-akpm/fs/locks.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff -puN fs/locks.c~knfsd-check-for-existence-of-file_lock-parameter-inside-of-the-kernel-lock fs/locks.c --- 25/fs/locks.c~knfsd-check-for-existence-of-file_lock-parameter-inside-of-the-kernel-lock Fri Dec 17 15:08:31 2004 +++ 25-akpm/fs/locks.c Fri Dec 17 15:08:31 2004 @@ -1096,15 +1096,13 @@ static void time_out_leases(struct inode */ 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(); } _