summaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-07-16 16:39:10 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-07-17 13:32:55 -0400
commit597d92891b8859b4b4949fd08e25e60fc80ddaaf (patch)
treec379c890a62a36b36b443cf23f81daa1605901b0 /fs/nfs/proc.c
parent6bbb4ae8ffc4eef825c8742eff1fefae69a82e41 (diff)
downloadlinux-597d92891b8859b4b4949fd08e25e60fc80ddaaf.tar.bz2
NFS: Split out NFS v2 inode operations
This patch moves the NFS v2 file and directory inode functions into files that are only compiled whet CONFIG_NFS_V2 is enabled. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index c5ed1c0a8ab7..4d3356af3309 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -745,6 +745,27 @@ static int nfs_return_delegation(struct inode *inode)
return 0;
}
+static const struct inode_operations nfs_dir_inode_operations = {
+ .create = nfs_create,
+ .lookup = nfs_lookup,
+ .link = nfs_link,
+ .unlink = nfs_unlink,
+ .symlink = nfs_symlink,
+ .mkdir = nfs_mkdir,
+ .rmdir = nfs_rmdir,
+ .mknod = nfs_mknod,
+ .rename = nfs_rename,
+ .permission = nfs_permission,
+ .getattr = nfs_getattr,
+ .setattr = nfs_setattr,
+};
+
+static const struct inode_operations nfs_file_inode_operations = {
+ .permission = nfs_permission,
+ .getattr = nfs_getattr,
+ .setattr = nfs_setattr,
+};
+
const struct nfs_rpc_ops nfs_v2_clientops = {
.version = 2, /* protocol version */
.dentry_ops = &nfs_dentry_operations,