From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753628AbaIDMtn (ORCPT ); Thu, 4 Sep 2014 08:49:43 -0400 Received: from mail-qc0-f170.google.com ([209.85.216.170]:63015 "EHLO mail-qc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbaIDMtl (ORCPT ); Thu, 4 Sep 2014 08:49:41 -0400 From: Jeff Layton X-Google-Original-From: Jeff Layton Date: Thu, 4 Sep 2014 08:49:38 -0400 To: Trond Myklebust Cc: Devel FS Linux , Linux NFS Mailing List , Christoph Hellwig , "J. Bruce Fields" , Linux Kernel mailing list , Steven Whitehouse , cluster-devel Subject: Re: [PATCH v2 01/17] locks: consolidate "nolease" routines Message-ID: <20140904084938.2664bf0a@tlielax.poochiereds.net> In-Reply-To: References: <1409834323-7171-1-git-send-email-jlayton@primarydata.com> <1409834323-7171-2-git-send-email-jlayton@primarydata.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Sep 2014 08:41:51 -0400 Trond Myklebust wrote: > On Thu, Sep 4, 2014 at 8:38 AM, Jeff Layton wrote: > > GFS2 and NFS have setlease routines that always just return -EINVAL. > > Turn that into a generic routine that can live in fs/libfs.c. > > > > Cc: Trond Myklebust > > Cc: > > Cc: Steven Whitehouse > > Cc: > > Signed-off-by: Jeff Layton > > --- > > fs/gfs2/file.c | 22 +--------------------- > > fs/libfs.c | 16 ++++++++++++++++ > > fs/nfs/file.c | 13 +------------ > > fs/nfs/internal.h | 1 - > > fs/nfs/nfs4file.c | 2 +- > > include/linux/fs.h | 1 + > > 6 files changed, 20 insertions(+), 35 deletions(-) > > Acked-by: Trond Myklebust > Thanks. While spinning this up, I did have a momentary pause to wonder if -ENOLCK would be a better return value here. It would make it easier to distinguish this from from "oops, I passed in bogus arguments". For now, I'll leave it as -EINVAL, but it's something to consider... -- Jeff Layton