aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/dir.c21
-rw-r--r--fs/nfs/file.c12
-rw-r--r--fs/nfs/nfs3proc.c29
-rw-r--r--include/linux/nfs_fs.h6
4 files changed, 29 insertions, 39 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 9ae329d62340..e75f2aaafadf 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -63,27 +63,6 @@ const struct address_space_operations nfs_dir_aops = {
63 .freepage = nfs_readdir_clear_array, 63 .freepage = nfs_readdir_clear_array,
64}; 64};
65 65
66#ifdef CONFIG_NFS_V3
67const struct inode_operations nfs3_dir_inode_operations = {
68 .create = nfs_create,
69 .lookup = nfs_lookup,
70 .link = nfs_link,
71 .unlink = nfs_unlink,
72 .symlink = nfs_symlink,
73 .mkdir = nfs_mkdir,
74 .rmdir = nfs_rmdir,
75 .mknod = nfs_mknod,
76 .rename = nfs_rename,
77 .permission = nfs_permission,
78 .getattr = nfs_getattr,
79 .setattr = nfs_setattr,
80 .listxattr = nfs3_listxattr,
81 .getxattr = nfs3_getxattr,
82 .setxattr = nfs3_setxattr,
83 .removexattr = nfs3_removexattr,
84};
85#endif /* CONFIG_NFS_V3 */
86
87#ifdef CONFIG_NFS_V4 66#ifdef CONFIG_NFS_V4
88 67
89static int nfs_atomic_open(struct inode *, struct dentry *, 68static int nfs_atomic_open(struct inode *, struct dentry *,
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 7da8745e22ac..76239178e959 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -41,18 +41,6 @@
41 41
42static const struct vm_operations_struct nfs_file_vm_ops; 42static const struct vm_operations_struct nfs_file_vm_ops;
43 43
44#ifdef CONFIG_NFS_V3
45const struct inode_operations nfs3_file_inode_operations = {
46 .permission = nfs_permission,
47 .getattr = nfs_getattr,
48 .setattr = nfs_setattr,
49 .listxattr = nfs3_listxattr,
50 .getxattr = nfs3_getxattr,
51 .setxattr = nfs3_setxattr,
52 .removexattr = nfs3_removexattr,
53};
54#endif /* CONFIG_NFS_v3 */
55
56/* Hack for future NFS swap support */ 44/* Hack for future NFS swap support */
57#ifndef IS_SWAPFILE 45#ifndef IS_SWAPFILE
58# define IS_SWAPFILE(inode) (0) 46# define IS_SWAPFILE(inode) (0)
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,
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 6c38bc9c0081..4b6043c20f77 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -427,9 +427,6 @@ extern __be32 root_nfs_parse_addr(char *name); /*__init*/
427/* 427/*
428 * linux/fs/nfs/file.c 428 * linux/fs/nfs/file.c
429 */ 429 */
430#ifdef CONFIG_NFS_V3
431extern const struct inode_operations nfs3_file_inode_operations;
432#endif /* CONFIG_NFS_V3 */
433extern const struct file_operations nfs_file_operations; 430extern const struct file_operations nfs_file_operations;
434#ifdef CONFIG_NFS_V4 431#ifdef CONFIG_NFS_V4
435extern const struct file_operations nfs4_file_operations; 432extern const struct file_operations nfs4_file_operations;
@@ -484,9 +481,6 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
484/* 481/*
485 * linux/fs/nfs/dir.c 482 * linux/fs/nfs/dir.c
486 */ 483 */
487#ifdef CONFIG_NFS_V3
488extern const struct inode_operations nfs3_dir_inode_operations;
489#endif /* CONFIG_NFS_V3 */
490extern const struct file_operations nfs_dir_operations; 484extern const struct file_operations nfs_dir_operations;
491extern const struct dentry_operations nfs_dentry_operations; 485extern const struct dentry_operations nfs_dentry_operations;
492 486