NFS: Split out NFS v4 inode operations
authorBryan Schumaker <bjschuma@netapp.com>
Mon, 16 Jul 2012 20:39:12 +0000 (16:39 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 17 Jul 2012 17:33:05 +0000 (13:33 -0400)
The NFS v4 file inode operations are already already in nfs4proc.c, so
this patch just needs to move the directory operations to the same file.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c

index e75f2aaafadf2a22e3810c0f47f911ee7ca7976f..d49f1b9cd3fdc058e9863384629fc618ffb49314 100644 (file)
@@ -63,33 +63,6 @@ const struct address_space_operations nfs_dir_aops = {
        .freepage = nfs_readdir_clear_array,
 };
 
-#ifdef CONFIG_NFS_V4
-
-static int nfs_atomic_open(struct inode *, struct dentry *,
-                          struct file *, unsigned, umode_t,
-                          int *);
-const struct inode_operations nfs4_dir_inode_operations = {
-       .create         = nfs_create,
-       .lookup         = nfs_lookup,
-       .atomic_open    = nfs_atomic_open,
-       .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,
-       .getxattr       = generic_getxattr,
-       .setxattr       = generic_setxattr,
-       .listxattr      = generic_listxattr,
-       .removexattr    = generic_removexattr,
-};
-
-#endif /* CONFIG_NFS_V4 */
-
 static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir, struct rpc_cred *cred)
 {
        struct nfs_open_dir_context *ctx;
@@ -1352,9 +1325,9 @@ out:
        return err;
 }
 
-static int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
-                           struct file *file, unsigned open_flags,
-                           umode_t mode, int *opened)
+int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
+                   struct file *file, unsigned open_flags,
+                   umode_t mode, int *opened)
 {
        struct nfs_open_context *ctx;
        struct dentry *res;
index 3696ca7f5f4d40a8b812a83fbbb39ec6fd347c8b..e2c4c72d3866dd37f575874535c836235abd7ead 100644 (file)
@@ -200,7 +200,10 @@ struct nfs4_state_maintenance_ops {
 };
 
 extern const struct dentry_operations nfs4_dentry_operations;
-extern const struct inode_operations nfs4_dir_inode_operations;
+
+/* dir.c */
+int nfs_atomic_open(struct inode *, struct dentry *, struct file *,
+                   unsigned, umode_t, int *);
 
 /* write.c */
 int nfs4_write_inode(struct inode *, struct writeback_control *);
index 05801be4a1802abe7f645713ea29ec2ad75b5dd8..5e373c30e8d42cdcb534dc981ce350e001e4b19e 100644 (file)
@@ -6832,6 +6832,26 @@ const struct nfs4_minor_version_ops *nfs_v4_minor_ops[] = {
 #endif
 };
 
+const struct inode_operations nfs4_dir_inode_operations = {
+       .create         = nfs_create,
+       .lookup         = nfs_lookup,
+       .atomic_open    = nfs_atomic_open,
+       .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,
+       .getxattr       = generic_getxattr,
+       .setxattr       = generic_setxattr,
+       .listxattr      = generic_listxattr,
+       .removexattr    = generic_removexattr,
+};
+
 static const struct inode_operations nfs4_file_inode_operations = {
        .permission     = nfs_permission,
        .getattr        = nfs_getattr,
This page took 0.036793 seconds and 5 git commands to generate.