From dc0ae0062f8e2123e311cbe967b3f77f7e1a7b3e Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Fri, 8 Jun 2007 15:23:34 -0400 Subject: [PATCH] --- yaml --- r: 61451 b: refs/heads/master c: 370f6599e8bc03fd9fc6d1a1be00ae0c6373ca59 h: refs/heads/master i: 61449: d9e9e9b6a574d7367257247ed6f7a118fb06ec79 61447: 7dbdf6fb4075176d7008363fb4bcc147c23066c0 v: v3 --- [refs] | 2 +- trunk/fs/nfs/file.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 752c2cbc10bc..c80c841b8fee 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 60446067ba7a8e890a91db3b4a7436fe0ebd2dee +refs/heads/master: 370f6599e8bc03fd9fc6d1a1be00ae0c6373ca59 diff --git a/trunk/fs/nfs/file.c b/trunk/fs/nfs/file.c index 8689b736fdd9..13ac6fa2b62b 100644 --- a/trunk/fs/nfs/file.c +++ b/trunk/fs/nfs/file.c @@ -53,6 +53,7 @@ static int nfs_fsync(struct file *, struct dentry *dentry, int datasync); static int nfs_check_flags(int flags); static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl); static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); +static int nfs_setlease(struct file *file, long arg, struct file_lock **fl); const struct file_operations nfs_file_operations = { .llseek = nfs_file_llseek, @@ -69,6 +70,7 @@ const struct file_operations nfs_file_operations = { .flock = nfs_flock, .splice_read = nfs_file_splice_read, .check_flags = nfs_check_flags, + .setlease = nfs_setlease, }; const struct inode_operations nfs_file_inode_operations = { @@ -558,3 +560,13 @@ static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) return do_unlk(filp, cmd, fl); return do_setlk(filp, cmd, fl); } + +static int nfs_setlease(struct file *file, long arg, struct file_lock **fl) +{ + /* + * There is no protocol support for leases, so we have no way + * to implement them correctly in the face of opens by other + * clients. + */ + return -EINVAL; +}