From patchwork Sat Mar 7 12:51:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 5959191 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0E848BF440 for ; Sat, 7 Mar 2015 12:51:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C6BF203A5 for ; Sat, 7 Mar 2015 12:51:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 276E520392 for ; Sat, 7 Mar 2015 12:51:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbbCGMv2 (ORCPT ); Sat, 7 Mar 2015 07:51:28 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.225]:60687 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752980AbbCGMv1 (ORCPT ); Sat, 7 Mar 2015 07:51:27 -0500 Received: from [107.15.97.250] ([107.15.97.250:41029] helo=tlielax.poochiereds.net) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id F4/F3-30891-F34FAF45; Sat, 07 Mar 2015 12:51:11 +0000 From: Jeff Layton To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, bfields@fieldses.org Subject: [PATCH] locks: fix generic_delete_lease tracepoint to use victim pointer Date: Sat, 7 Mar 2015 07:51:10 -0500 Message-Id: <1425732670-4890-1-git-send-email-jeff.layton@primarydata.com> X-Mailer: git-send-email 2.1.0 X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's possible that "fl" won't point at a valid lock at this point, so have it instead point at "victim" which is either a valid lock or NULL. Signed-off-by: Jeff Layton --- fs/locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/locks.c b/fs/locks.c index 8f61ad524e3e..0915a3ead897 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1732,7 +1732,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);