diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/dir.c | 33 | ||||
-rw-r--r-- | fs/nfs/nfs4_fs.h | 5 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 20 |
3 files changed, 27 insertions, 31 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index e75f2aaafadf..d49f1b9cd3fd 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -63,33 +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_V4 | ||
67 | |||
68 | static int nfs_atomic_open(struct inode *, struct dentry *, | ||
69 | struct file *, unsigned, umode_t, | ||
70 | int *); | ||
71 | const struct inode_operations nfs4_dir_inode_operations = { | ||
72 | .create = nfs_create, | ||
73 | .lookup = nfs_lookup, | ||
74 | .atomic_open = nfs_atomic_open, | ||
75 | .link = nfs_link, | ||
76 | .unlink = nfs_unlink, | ||
77 | .symlink = nfs_symlink, | ||
78 | .mkdir = nfs_mkdir, | ||
79 | .rmdir = nfs_rmdir, | ||
80 | .mknod = nfs_mknod, | ||
81 | .rename = nfs_rename, | ||
82 | .permission = nfs_permission, | ||
83 | .getattr = nfs_getattr, | ||
84 | .setattr = nfs_setattr, | ||
85 | .getxattr = generic_getxattr, | ||
86 | .setxattr = generic_setxattr, | ||
87 | .listxattr = generic_listxattr, | ||
88 | .removexattr = generic_removexattr, | ||
89 | }; | ||
90 | |||
91 | #endif /* CONFIG_NFS_V4 */ | ||
92 | |||
93 | static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir, struct rpc_cred *cred) | 66 | static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir, struct rpc_cred *cred) |
94 | { | 67 | { |
95 | struct nfs_open_dir_context *ctx; | 68 | struct nfs_open_dir_context *ctx; |
@@ -1352,9 +1325,9 @@ out: | |||
1352 | return err; | 1325 | return err; |
1353 | } | 1326 | } |
1354 | 1327 | ||
1355 | static int nfs_atomic_open(struct inode *dir, struct dentry *dentry, | 1328 | int nfs_atomic_open(struct inode *dir, struct dentry *dentry, |
1356 | struct file *file, unsigned open_flags, | 1329 | struct file *file, unsigned open_flags, |
1357 | umode_t mode, int *opened) | 1330 | umode_t mode, int *opened) |
1358 | { | 1331 | { |
1359 | struct nfs_open_context *ctx; | 1332 | struct nfs_open_context *ctx; |
1360 | struct dentry *res; | 1333 | struct dentry *res; |
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 3696ca7f5f4d..e2c4c72d3866 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -200,7 +200,10 @@ struct nfs4_state_maintenance_ops { | |||
200 | }; | 200 | }; |
201 | 201 | ||
202 | extern const struct dentry_operations nfs4_dentry_operations; | 202 | extern const struct dentry_operations nfs4_dentry_operations; |
203 | extern const struct inode_operations nfs4_dir_inode_operations; | 203 | |
204 | /* dir.c */ | ||
205 | int nfs_atomic_open(struct inode *, struct dentry *, struct file *, | ||
206 | unsigned, umode_t, int *); | ||
204 | 207 | ||
205 | /* write.c */ | 208 | /* write.c */ |
206 | int nfs4_write_inode(struct inode *, struct writeback_control *); | 209 | int nfs4_write_inode(struct inode *, struct writeback_control *); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 05801be4a180..5e373c30e8d4 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -6832,6 +6832,26 @@ const struct nfs4_minor_version_ops *nfs_v4_minor_ops[] = { | |||
6832 | #endif | 6832 | #endif |
6833 | }; | 6833 | }; |
6834 | 6834 | ||
6835 | const struct inode_operations nfs4_dir_inode_operations = { | ||
6836 | .create = nfs_create, | ||
6837 | .lookup = nfs_lookup, | ||
6838 | .atomic_open = nfs_atomic_open, | ||
6839 | .link = nfs_link, | ||
6840 | .unlink = nfs_unlink, | ||
6841 | .symlink = nfs_symlink, | ||
6842 | .mkdir = nfs_mkdir, | ||
6843 | .rmdir = nfs_rmdir, | ||
6844 | .mknod = nfs_mknod, | ||
6845 | .rename = nfs_rename, | ||
6846 | .permission = nfs_permission, | ||
6847 | .getattr = nfs_getattr, | ||
6848 | .setattr = nfs_setattr, | ||
6849 | .getxattr = generic_getxattr, | ||
6850 | .setxattr = generic_setxattr, | ||
6851 | .listxattr = generic_listxattr, | ||
6852 | .removexattr = generic_removexattr, | ||
6853 | }; | ||
6854 | |||
6835 | static const struct inode_operations nfs4_file_inode_operations = { | 6855 | static const struct inode_operations nfs4_file_inode_operations = { |
6836 | .permission = nfs_permission, | 6856 | .permission = nfs_permission, |
6837 | .getattr = nfs_getattr, | 6857 | .getattr = nfs_getattr, |