mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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: <[email protected]> Cc: Steven Whitehouse <[email protected]> Cc: <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Acked-by: Trond Myklebust <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
699688a416
commit
1c994a0909
6 changed files with 20 additions and 35 deletions
16
fs/libfs.c
16
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue