From patchwork Thu Jan 22 14:27:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 5685501 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6A8979F358 for ; Thu, 22 Jan 2015 14:35:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B2C3201F5 for ; Thu, 22 Jan 2015 14:35:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B1D4201DD for ; Thu, 22 Jan 2015 14:35:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753898AbbAVOfw (ORCPT ); Thu, 22 Jan 2015 09:35:52 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.225]:6482 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753263AbbAVOfu (ORCPT ); Thu, 22 Jan 2015 09:35:50 -0500 Received: from [107.15.97.250] ([107.15.97.250:43943] helo=tlielax.poochiereds.net) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 64/A2-09108-3F801C45; Thu, 22 Jan 2015 14:28:03 +0000 From: Jeff Layton To: linux-fsdevel@vger.kernel.org Cc: Christoph Hellwig , Sasha Levin , David Howells , linux-kernel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org Subject: [PATCH v3 13/13] locks: update comments that refer to inode->i_flock Date: Thu, 22 Jan 2015 09:27:57 -0500 Message-Id: <1421936877-27529-14-git-send-email-jeff.layton@primarydata.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421936877-27529-1-git-send-email-jeff.layton@primarydata.com> References: <1421936877-27529-1-git-send-email-jeff.layton@primarydata.com> X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@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=unavailable 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 Signed-off-by: Jeff Layton --- fs/locks.c | 2 +- include/linux/fs.h | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/fs/locks.c b/fs/locks.c index 2fc36b3772a0..4d0d41163a50 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -2212,7 +2212,7 @@ again: */ /* * we need that spin_lock here - it prevents reordering between - * update of inode->i_flock and check for it done in close(). + * update of i_flctx->flc_posix and check for it done in close(). * rcu_read_lock() wouldn't do. */ spin_lock(¤t->files->file_lock); diff --git a/include/linux/fs.h b/include/linux/fs.h index f87cb2f03103..ddd2fa7cefd3 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -925,12 +925,11 @@ int locks_in_grace(struct net *); * FIXME: should we create a separate "struct lock_request" to help distinguish * these two uses? * - * The i_flock list is ordered by: + * The varous i_flctx lists are ordered by: * - * 1) lock type -- FL_LEASEs first, then FL_FLOCK, and finally FL_POSIX - * 2) lock owner - * 3) lock range start - * 4) lock range end + * 1) lock owner + * 2) lock range start + * 3) lock range end * * Obviously, the last two criteria only matter for POSIX locks. */ @@ -1992,8 +1991,9 @@ static inline int break_lease(struct inode *inode, unsigned int mode) { /* * Since this check is lockless, we must ensure that any refcounts - * taken are done before checking inode->i_flock. Otherwise, we could - * end up racing with tasks trying to set a new lease on this file. + * taken are done before checking i_flctx->flc_lease. Otherwise, we + * could end up racing with tasks trying to set a new lease on this + * file. */ smp_mb(); if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease)) @@ -2005,8 +2005,9 @@ static inline int break_deleg(struct inode *inode, unsigned int mode) { /* * Since this check is lockless, we must ensure that any refcounts - * taken are done before checking inode->i_flock. Otherwise, we could - * end up racing with tasks trying to set a new lease on this file. + * taken are done before checking i_flctx->flc_lease. Otherwise, we + * could end up racing with tasks trying to set a new lease on this + * file. */ smp_mb(); if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease))