From patchwork Wed Oct 3 23:24:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronnie Sahlberg X-Patchwork-Id: 10625391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BBA118A7 for ; Wed, 3 Oct 2018 23:25:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0952328EF3 for ; Wed, 3 Oct 2018 23:25:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F176828F35; Wed, 3 Oct 2018 23:25:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD46528EF3 for ; Wed, 3 Oct 2018 23:25:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726279AbeJDGPa (ORCPT ); Thu, 4 Oct 2018 02:15:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51298 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbeJDGPa (ORCPT ); Thu, 4 Oct 2018 02:15:30 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 478AE3680A; Wed, 3 Oct 2018 23:25:00 +0000 (UTC) Received: from test1135.test.redhat.com (vpn2-54-29.bne.redhat.com [10.64.54.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC2CB709B8; Wed, 3 Oct 2018 23:24:59 +0000 (UTC) From: Ronnie Sahlberg To: linux-cifs Cc: Steve French Subject: [PATCH 0/1] Fir for OFD locks. RHBZ 1484130 Date: Thu, 4 Oct 2018 09:24:37 +1000 Message-Id: <20181003232438.14484-1-lsahlber@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 03 Oct 2018 23:25:00 +0000 (UTC) Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Here is an updated version of my original patch to fix OFD locking. The difference between this and the my original version is that I added extra parenthesis to make it easier to read as per Jeff's suggestion and I added a check if the files were the same from Pavel's review. This is based on my original submission and not Paulo's patch. I think Paulo's patch is primising since it will also refactor the code to be easier to understand, but that is for a later patch. This patch is smaller in the changes it does to the difficult parts and I think less risky for changing behavior. Something like Paulos patch is probably worthwile to refactor and simplify the code at a later stage. I tested this on-top of the current sfrench/for-next using xfstest. No new regressions as far as I can tell.