]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
NTFS: Make fs/ntfs/namei.c::ntfs_get_{parent,dentry} static and move the
authorAnton Altaparmakov <aia21@cantab.net>
Thu, 3 Mar 2005 13:44:15 +0000 (13:44 +0000)
committerAnton Altaparmakov <aia21@cantab.net>
Thu, 5 May 2005 10:13:56 +0000 (11:13 +0100)
      definition of ntfs_export_ops from fs/ntfs/super.c to namei.c.
      Also, declare ntfs_export_ops in fs/ntfs/ntfs.h.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
fs/ntfs/ChangeLog
fs/ntfs/namei.c
fs/ntfs/ntfs.h
fs/ntfs/super.c

index bfd86c5cc480fc1a86cc479ff3e87f2e2d642018..cf21e0571b682e69f9a3165fcd098b96ce1709f9 100644 (file)
@@ -81,6 +81,9 @@ ToDo/Notes:
          mft record for resident attributes (fs/ntfs/inode.c).
        - Small readability cleanup to use "a" instead of "ctx->attr"
          everywhere (fs/ntfs/inode.c).
+       - Make fs/ntfs/namei.c::ntfs_get_{parent,dentry} static and move the
+         definition of ntfs_export_ops from fs/ntfs/super.c to namei.c.  Also,
+         declare ntfs_export_ops in fs/ntfs/ntfs.h.
 
 2.1.22 - Many bug and race fixes and error handling improvements.
 
index 7c7e13b43b2e3525ce833a439619ab59c6833e70..d261e25bd9ba813f5092625d82fe9b009da71b46 100644 (file)
@@ -380,7 +380,7 @@ struct inode_operations ntfs_dir_inode_ops = {
  * Return the dentry of the parent directory on success or the error code on
  * error (IS_ERR() is true).
  */
-struct dentry *ntfs_get_parent(struct dentry *child_dent)
+static struct dentry *ntfs_get_parent(struct dentry *child_dent)
 {
        struct inode *vi = child_dent->d_inode;
        ntfs_inode *ni = NTFS_I(vi);
@@ -465,7 +465,7 @@ try_next:
  *
  * Return the dentry on success or the error code on error (IS_ERR() is true).
  */
-struct dentry *ntfs_get_dentry(struct super_block *sb, void *fh)
+static struct dentry *ntfs_get_dentry(struct super_block *sb, void *fh)
 {
        struct inode *vi;
        struct dentry *dent;
@@ -496,3 +496,30 @@ struct dentry *ntfs_get_dentry(struct super_block *sb, void *fh)
        ntfs_debug("Done for inode 0x%lx, generation 0x%x.", ino, gen);
        return dent;
 }
+
+/**
+ * Export operations allowing NFS exporting of mounted NTFS partitions.
+ *
+ * We use the default ->decode_fh() and ->encode_fh() for now.  Note that they
+ * use 32 bits to store the inode number which is an unsigned long so on 64-bit
+ * architectures is usually 64 bits so it would all fail horribly on huge
+ * volumes.  I guess we need to define our own encode and decode fh functions
+ * that store 64-bit inode numbers at some point but for now we will ignore the
+ * problem...
+ *
+ * We also use the default ->get_name() helper (used by ->decode_fh() via
+ * fs/exportfs/expfs.c::find_exported_dentry()) as that is completely fs
+ * independent.
+ *
+ * The default ->get_parent() just returns -EACCES so we have to provide our
+ * own and the default ->get_dentry() is incompatible with NTFS due to not
+ * allowing the inode number 0 which is used in NTFS for the system file $MFT
+ * and due to using iget() whereas NTFS needs ntfs_iget().
+ */
+struct export_operations ntfs_export_ops = {
+       .get_parent     = ntfs_get_parent,      /* Find the parent of a given
+                                                  directory. */
+       .get_dentry     = ntfs_get_dentry,      /* Find a dentry for the inode
+                                                  given a file handle
+                                                  sub-fragment. */
+};
index 720ffb71bab84204918352b852440883ef20c5fd..a0bf706797bb28c507927eff0871738afe4093df 100644 (file)
@@ -65,6 +65,8 @@ extern struct inode_operations ntfs_dir_inode_ops;
 extern struct  file_operations ntfs_empty_file_ops;
 extern struct inode_operations ntfs_empty_inode_ops;
 
+extern struct export_operations ntfs_export_ops;
+
 /**
  * NTFS_SB - return the ntfs volume given a vfs super block
  * @sb:                VFS super block
index b676cf6fd93cefe75ce84aabdd2df24a1e3a2140..78416eb2a168092d20499c2e535b2a328e9a4bb7 100644 (file)
@@ -2250,40 +2250,6 @@ static struct super_operations ntfs_sops = {
                                                   proc. */
 };
 
-
-/**
- * Declarations for NTFS specific export operations (fs/ntfs/namei.c).
- */
-extern struct dentry *ntfs_get_parent(struct dentry *child_dent);
-extern struct dentry *ntfs_get_dentry(struct super_block *sb, void *fh);
-
-/**
- * Export operations allowing NFS exporting of mounted NTFS partitions.
- *
- * We use the default ->decode_fh() and ->encode_fh() for now.  Note that they
- * use 32 bits to store the inode number which is an unsigned long so on 64-bit
- * architectures is usually 64 bits so it would all fail horribly on huge
- * volumes.  I guess we need to define our own encode and decode fh functions
- * that store 64-bit inode numbers at some point but for now we will ignore the
- * problem...
- *
- * We also use the default ->get_name() helper (used by ->decode_fh() via
- * fs/exportfs/expfs.c::find_exported_dentry()) as that is completely fs
- * independent.
- *
- * The default ->get_parent() just returns -EACCES so we have to provide our
- * own and the default ->get_dentry() is incompatible with NTFS due to not
- * allowing the inode number 0 which is used in NTFS for the system file $MFT
- * and due to using iget() whereas NTFS needs ntfs_iget().
- */
-static struct export_operations ntfs_export_ops = {
-       .get_parent     = ntfs_get_parent,      /* Find the parent of a given
-                                                  directory. */
-       .get_dentry     = ntfs_get_dentry,      /* Find a dentry for the inode
-                                                  given a file handle
-                                                  sub-fragment. */
-};
-
 /**
  * ntfs_fill_super - mount an ntfs filesystem
  * @sb:                super block of ntfs filesystem to mount