summaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
authorBryan Schumaker2012-07-16 22:39:10 +0200
committerTrond Myklebust2012-07-17 19:32:55 +0200
commit597d92891b8859b4b4949fd08e25e60fc80ddaaf (patch)
treec379c890a62a36b36b443cf23f81daa1605901b0 /fs/nfs/proc.c
parentNFS: Clean up nfs4_proc_setclientid() and friends (diff)
downloadkernel-qcow2-linux-597d92891b8859b4b4949fd08e25e60fc80ddaaf.tar.gz
kernel-qcow2-linux-597d92891b8859b4b4949fd08e25e60fc80ddaaf.tar.xz
kernel-qcow2-linux-597d92891b8859b4b4949fd08e25e60fc80ddaaf.zip
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,