diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-08-27 06:49:41 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@primarydata.com> | 2014-09-09 16:01:36 -0400 |
commit | 1c994a0909a556508c2cc26ab5d9e13c5ce33aa0 (patch) | |
tree | 6bb67db15f5e74c07c793ce3e27165c542f14c95 /fs/libfs.c | |
parent | 699688a416524c3cea9eafaca69fc6c06c13c02e (diff) | |
download | linux-1c994a0909a556508c2cc26ab5d9e13c5ce33aa0.tar.gz linux-1c994a0909a556508c2cc26ab5d9e13c5ce33aa0.tar.bz2 linux-1c994a0909a556508c2cc26ab5d9e13c5ce33aa0.zip |
locks: consolidate "nolease" routines
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: <linux-nfs@vger.kernel.org>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: <cluster-devel@redhat.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Acked-by: Trond Myklebust <trond.myklebust@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 88e3e00e2eca..29012a303ef8 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -1075,3 +1075,19 @@ struct inode *alloc_anon_inode(struct super_block *s) return inode; } EXPORT_SYMBOL(alloc_anon_inode); + +/** + * simple_nosetlease - generic helper for prohibiting leases + * @filp: file pointer + * @arg: type of lease to obtain + * @flp: new lease supplied for insertion + * + * Generic helper for filesystems that do not wish to allow leases to be set. + * All arguments are ignored and it just returns -EINVAL. + */ +int +simple_nosetlease(struct file *filp, long arg, struct file_lock **flp) +{ + return -EINVAL; +} +EXPORT_SYMBOL(simple_nosetlease); |