nfsd: Fix a memory leak of struct file_lock

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
Kinglong Mee 2015-07-13 17:30:51 +08:00 committed by J. Bruce Fields
parent 1b6dc1dffb
commit af9dbaf48d
1 changed files with 1 additions and 0 deletions

View File

@ -3934,6 +3934,7 @@ static int nfs4_setlease(struct nfs4_delegation *dp)
if (!filp) {
/* We should always have a readable file here */
WARN_ON_ONCE(1);
locks_free_lock(fl);
return -EBADF;
}
fl->fl_file = filp;