locks: give lm_break a return value
authorJeff Layton <jlayton@primarydata.com>
Mon, 1 Sep 2014 19:06:54 +0000 (15:06 -0400)
committerJeff Layton <jlayton@primarydata.com>
Tue, 7 Oct 2014 18:06:13 +0000 (14:06 -0400)
commit4d01b7f5e7576858b71cbaa72b541e17a229cb91
tree5ea9a839335ca6159ac24f1cf5ddfbe3ff1e7c74
parent03d12ddf845a4eb874ffa558d65a548aee9b715b
locks: give lm_break a return value

Christoph suggests:

   "Add a return value to lm_break so that the lock manager can tell the
    core code "you can delete this lease right now".  That gets rid of
    the games with the timeout which require all kinds of race avoidance
    code in the users."

Do that here and have the nfsd lease break routine use it when it detects
that there was a race between setting up the lease and it being broken.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/locks.c
fs/nfsd/nfs4state.c
include/linux/fs.h