aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index a706b6bcc286..4d3356af3309 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -259,7 +259,7 @@ static void nfs_free_createdata(const struct nfs_createdata *data)
259 259
260static int 260static int
261nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, 261nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
262 int flags, struct nfs_open_context *ctx) 262 int flags)
263{ 263{
264 struct nfs_createdata *data; 264 struct nfs_createdata *data;
265 struct rpc_message msg = { 265 struct rpc_message msg = {
@@ -651,7 +651,7 @@ static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data)
651 /* Emulate the eof flag, which isn't normally needed in NFSv2 651 /* Emulate the eof flag, which isn't normally needed in NFSv2
652 * as it is guaranteed to always return the file attributes 652 * as it is guaranteed to always return the file attributes
653 */ 653 */
654 if (data->args.offset + data->args.count >= data->res.fattr->size) 654 if (data->args.offset + data->res.count >= data->res.fattr->size)
655 data->res.eof = 1; 655 data->res.eof = 1;
656 } 656 }
657 return 0; 657 return 0;
@@ -734,6 +734,38 @@ out_einval:
734 return -EINVAL; 734 return -EINVAL;
735} 735}
736 736
737static int nfs_have_delegation(struct inode *inode, fmode_t flags)
738{
739 return 0;
740}
741
742static int nfs_return_delegation(struct inode *inode)
743{
744 nfs_wb_all(inode);
745 return 0;
746}
747
748static const struct inode_operations nfs_dir_inode_operations = {
749 .create = nfs_create,
750 .lookup = nfs_lookup,
751 .link = nfs_link,
752 .unlink = nfs_unlink,
753 .symlink = nfs_symlink,
754 .mkdir = nfs_mkdir,
755 .rmdir = nfs_rmdir,
756 .mknod = nfs_mknod,
757 .rename = nfs_rename,
758 .permission = nfs_permission,
759 .getattr = nfs_getattr,
760 .setattr = nfs_setattr,
761};
762
763static const struct inode_operations nfs_file_inode_operations = {
764 .permission = nfs_permission,
765 .getattr = nfs_getattr,
766 .setattr = nfs_setattr,
767};
768
737const struct nfs_rpc_ops nfs_v2_clientops = { 769const struct nfs_rpc_ops nfs_v2_clientops = {
738 .version = 2, /* protocol version */ 770 .version = 2, /* protocol version */
739 .dentry_ops = &nfs_dentry_operations, 771 .dentry_ops = &nfs_dentry_operations,
@@ -767,9 +799,11 @@ const struct nfs_rpc_ops nfs_v2_clientops = {
767 .pathconf = nfs_proc_pathconf, 799 .pathconf = nfs_proc_pathconf,
768 .decode_dirent = nfs2_decode_dirent, 800 .decode_dirent = nfs2_decode_dirent,
769 .read_setup = nfs_proc_read_setup, 801 .read_setup = nfs_proc_read_setup,
802 .read_pageio_init = nfs_pageio_init_read,
770 .read_rpc_prepare = nfs_proc_read_rpc_prepare, 803 .read_rpc_prepare = nfs_proc_read_rpc_prepare,
771 .read_done = nfs_read_done, 804 .read_done = nfs_read_done,
772 .write_setup = nfs_proc_write_setup, 805 .write_setup = nfs_proc_write_setup,
806 .write_pageio_init = nfs_pageio_init_write,
773 .write_rpc_prepare = nfs_proc_write_rpc_prepare, 807 .write_rpc_prepare = nfs_proc_write_rpc_prepare,
774 .write_done = nfs_write_done, 808 .write_done = nfs_write_done,
775 .commit_setup = nfs_proc_commit_setup, 809 .commit_setup = nfs_proc_commit_setup,
@@ -777,5 +811,9 @@ const struct nfs_rpc_ops nfs_v2_clientops = {
777 .lock = nfs_proc_lock, 811 .lock = nfs_proc_lock,
778 .lock_check_bounds = nfs_lock_check_bounds, 812 .lock_check_bounds = nfs_lock_check_bounds,
779 .close_context = nfs_close_context, 813 .close_context = nfs_close_context,
814 .have_delegation = nfs_have_delegation,
815 .return_delegation = nfs_return_delegation,
816 .alloc_client = nfs_alloc_client,
780 .init_client = nfs_init_client, 817 .init_client = nfs_init_client,
818 .free_client = nfs_free_client,
781}; 819};