locks: generic_delete_lease doesn't need a file_lock at all
authorJeff Layton <jlayton@primarydata.com>
Fri, 22 Aug 2014 14:18:45 +0000 (10:18 -0400)
committerJeff Layton <jlayton@primarydata.com>
Tue, 7 Oct 2014 18:06:12 +0000 (14:06 -0400)
commit0efaa7e82f02fe69c05ad28e905f31fc86e6f08e
treebf7e9d91c5800da259fa3ee9907287ba2b2d6cc1
parent415b96c5a1fe31ed9deb0618e95ecbb1df3de54c
locks: generic_delete_lease doesn't need a file_lock at all

Ensure that it's OK to pass in a NULL file_lock double pointer on
a F_UNLCK request and convert the vfs_setlease F_UNLCK callers to
do just that.

Finally, turn the BUG_ON in generic_setlease into a WARN_ON_ONCE
with an error return. That's a problem we can handle without
crashing the box if it occurs.

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