Re: [PATCH v2 01/17] locks: consolidate "nolease" routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 4, 2014 at 8:49 AM, Jeff Layton <jeff.layton@xxxxxxxxxxxxxxx> wrote:
> On Thu, 4 Sep 2014 08:41:51 -0400
> Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> wrote:
>
>> On Thu, Sep 4, 2014 at 8:38 AM, Jeff Layton <jlayton@xxxxxxxxxxxxxxx> 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 <trond.myklebust@xxxxxxxxxxxxxxx>
>> > Cc: <linux-nfs@xxxxxxxxxxxxxxx>
>> > Cc: Steven Whitehouse <swhiteho@xxxxxxxxxx>
>> > Cc: <cluster-devel@xxxxxxxxxx>
>> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
>> > ---
>> >  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 <trond.myklebust@xxxxxxxxxxxxxxx>
>>
>
> 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...
>

Actually, it looks as if when you compile with !CONFIG_FILE_LOCKING,
then fcntl_setlease() returns the value '0' (which would be
"success!"). The word "confusing" only begins to describe it all.

Cheers
  Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux