aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs3proc.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-07-16 16:39:11 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-07-17 13:33:03 -0400
commitab96291ea16b6b9c76bfac35ccbb26a15ecb01ce (patch)
tree46c37d231ad4fc4d7443c494c299a5bd76560145 /fs/nfs/nfs3proc.c
parent597d92891b8859b4b4949fd08e25e60fc80ddaaf (diff)
NFS: Split out NFS v3 inode operations
This patch moves the NFS v3 file and directory inode functions into files that are only compiled whet CONFIG_NFS_V3 is enabled. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs3proc.c')
-rw-r--r--fs/nfs/nfs3proc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index f580358cad62..65d23eb92fe0 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -888,6 +888,35 @@ static int nfs3_return_delegation(struct inode *inode)
888 return 0; 888 return 0;
889} 889}
890 890
891static const struct inode_operations nfs3_dir_inode_operations = {
892 .create = nfs_create,
893 .lookup = nfs_lookup,
894 .link = nfs_link,
895 .unlink = nfs_unlink,
896 .symlink = nfs_symlink,
897 .mkdir = nfs_mkdir,
898 .rmdir = nfs_rmdir,
899 .mknod = nfs_mknod,
900 .rename = nfs_rename,
901 .permission = nfs_permission,
902 .getattr = nfs_getattr,
903 .setattr = nfs_setattr,
904 .listxattr = nfs3_listxattr,
905 .getxattr = nfs3_getxattr,
906 .setxattr = nfs3_setxattr,
907 .removexattr = nfs3_removexattr,
908};
909
910static const struct inode_operations nfs3_file_inode_operations = {
911 .permission = nfs_permission,
912 .getattr = nfs_getattr,
913 .setattr = nfs_setattr,
914 .listxattr = nfs3_listxattr,
915 .getxattr = nfs3_getxattr,
916 .setxattr = nfs3_setxattr,
917 .removexattr = nfs3_removexattr,
918};
919
891const struct nfs_rpc_ops nfs_v3_clientops = { 920const struct nfs_rpc_ops nfs_v3_clientops = {
892 .version = 3, /* protocol version */ 921 .version = 3, /* protocol version */
893 .dentry_ops = &nfs_dentry_operations, 922 .dentry_ops = &nfs_dentry_operations,