Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751618AbdFFUp3 (ORCPT ); Tue, 6 Jun 2017 16:45:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42344 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbdFFUpZ (ORCPT ); Tue, 6 Jun 2017 16:45:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8CECF8553D Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bcodding@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8CECF8553D From: Benjamin Coddington To: Jeff Layton , bfields@fieldses.org, Alexander Viro Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3 v4] Fixups for l_pid Date: Tue, 6 Jun 2017 16:45:20 -0400 Message-Id: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 06 Jun 2017 20:45:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1208 Lines: 30 LTP fcntl tests (fcntl11 fcntl14 fcntl17 fcntl19 fcntl20 fcntl21) have been failing for NFSv4 mounts due to an unexpected l_pid. What follows are some fixups: v2: - Rebase onto linux-next - Revert back to using the stack in locks_mandatory_area(), and fixup patch description for 1/3 v3: - The lkp-robot found some serious per_thread_ops performance regressions for v1 and v2, so this version changes things around to not acquire a reference to struct pid in fl_nspid for every lock. Instead, it drops fl_nspid altogether, and defers the lookup of the namespace-translated pid until it actually needed. v4: - Instead of looking up the virtual pid by way of referencing the struct task of the that pid, instead use find_pid_ns() and pid_nr_ns(), which avoids a the problem where we race to get a reference to the struct task while it may be freed. Benjamin Coddington (3): fs/locks: Use allocation rather than the stack in fcntl_getlk() fs/locks: Remove fl_nspid fs/locks: Use fs-specific l_pid for remote locks fs/locks.c | 116 ++++++++++++++++++++++++++++++++--------------------- include/linux/fs.h | 2 +- 2 files changed, 72 insertions(+), 46 deletions(-) -- 2.9.3