Skip to content

Commit

Permalink
locks: fix generic_delete_lease tracepoint to use victim pointer
Browse files Browse the repository at this point in the history
It's possible that "fl" won't point at a valid lock at this point, so
use "victim" instead which is either a valid lock or NULL.

Signed-off-by: Jeff Layton <[email protected]>
  • Loading branch information
Jeff Layton committed Mar 14, 2015
1 parent 5fb0f7f commit a9b1b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ static int generic_delete_lease(struct file *filp, void *owner)
break;
}
}
trace_generic_delete_lease(inode, fl);
trace_generic_delete_lease(inode, victim);
if (victim)
error = fl->fl_lmops->lm_change(victim, F_UNLCK, &dispose);
spin_unlock(&ctx->flc_lock);
Expand Down

0 comments on commit a9b1b45

Please sign in to comment.