Skip to content

Commit

Permalink
Leak in nlmsvc_testlock for async GETFL case
Browse files Browse the repository at this point in the history
Fix nlm_block leak for the case of supplied blocking lock info.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Oleg Drokin authored and J. Bruce Fields committed Feb 1, 2008
1 parent 8838dc4 commit 54ca95e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,12 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
goto out;
}
if (block->b_flags & B_GOT_CALLBACK) {
nlmsvc_unlink_block(block);
if (block->b_fl != NULL
&& block->b_fl->fl_type != F_UNLCK) {
lock->fl = *block->b_fl;
goto conf_lock;
} else {
nlmsvc_unlink_block(block);
ret = nlm_granted;
goto out;
}
Expand Down

0 comments on commit 54ca95e

Please sign in to comment.