|
@@ -886,3 +886,35 @@ static int nfs_setlease(struct file *file, long arg, struct file_lock **fl)
|
|
file->f_path.dentry->d_name.name, arg);
|
|
file->f_path.dentry->d_name.name, arg);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+#ifdef CONFIG_NFS_V4
|
|
|
|
+static int
|
|
|
|
+nfs4_file_open(struct inode *inode, struct file *filp)
|
|
|
|
+{
|
|
|
|
+ /*
|
|
|
|
+ * NFSv4 opens are handled in d_lookup and d_revalidate. If we get to
|
|
|
|
+ * this point, then something is very wrong
|
|
|
|
+ */
|
|
|
|
+ dprintk("NFS: %s called! inode=%p filp=%p\n", __func__, inode, filp);
|
|
|
|
+ return -ENOTDIR;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const struct file_operations nfs4_file_operations = {
|
|
|
|
+ .llseek = nfs_file_llseek,
|
|
|
|
+ .read = do_sync_read,
|
|
|
|
+ .write = do_sync_write,
|
|
|
|
+ .aio_read = nfs_file_read,
|
|
|
|
+ .aio_write = nfs_file_write,
|
|
|
|
+ .mmap = nfs_file_mmap,
|
|
|
|
+ .open = nfs4_file_open,
|
|
|
|
+ .flush = nfs_file_flush,
|
|
|
|
+ .release = nfs_file_release,
|
|
|
|
+ .fsync = nfs_file_fsync,
|
|
|
|
+ .lock = nfs_lock,
|
|
|
|
+ .flock = nfs_flock,
|
|
|
|
+ .splice_read = nfs_file_splice_read,
|
|
|
|
+ .splice_write = nfs_file_splice_write,
|
|
|
|
+ .check_flags = nfs_check_flags,
|
|
|
|
+ .setlease = nfs_setlease,
|
|
|
|
+};
|
|
|
|
+#endif /* CONFIG_NFS_V4 */
|