locks: fix generic_delete_lease tracepoint to use victim pointer
authorJeff Layton <jeff.layton@primarydata.com>
Sat, 14 Mar 2015 13:45:35 +0000 (09:45 -0400)
committerJeff Layton <jeff.layton@primarydata.com>
Sat, 14 Mar 2015 13:45:35 +0000 (09:45 -0400)
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 <jeff.layton@primarydata.com>
fs/locks.c

index f1bad681fc1ca3df14eda4be6542088425e901d2..528fedfda15e6432bd69b80c7bd8faceb7d1351d 100644 (file)
@@ -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);