Commit 714cd140 authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Move the static inline ntfs_init_big_inode() from fs/ntfs/inode.c to

      inode.h and make fs/ntfs/inode.c::__ntfs_init_inode() non-static and
      add a declaration for it to inode.h.  Fix some compilation issues
      that resulted due to #includes and header file interdependencies.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent 89fdbccc
......@@ -128,6 +128,10 @@ ToDo/Notes:
dirty state. We cannot look at the dirty state for subsequent
buffers because we might be racing with
fs/ntfs/aops.c::mark_ntfs_record_dirty().
- Move the static inline ntfs_init_big_inode() from fs/ntfs/inode.c to
inode.h and make fs/ntfs/inode.c::__ntfs_init_inode() non-static and
add a declaration for it to inode.h. Fix some compilation issues
that resulted due to #includes and header file interdependencies.
2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
......
......@@ -29,9 +29,11 @@
#include <linux/writeback.h>
#include "aops.h"
#include "attrib.h"
#include "debug.h"
#include "inode.h"
#include "mft.h"
#include "runlist.h"
#include "types.h"
#include "ntfs.h"
......
......@@ -25,6 +25,7 @@
#include <linux/buffer_head.h>
#include <linux/blkdev.h>
#include "attrib.h"
#include "inode.h"
#include "debug.h"
#include "ntfs.h"
......
......@@ -22,13 +22,9 @@
#ifndef _LINUX_NTFS_DEBUG_H
#define _LINUX_NTFS_DEBUG_H
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/fs.h>
#include "inode.h"
#include "attrib.h"
#include "runlist.h"
#ifdef DEBUG
......
......@@ -22,6 +22,7 @@
#include <linux/pagemap.h>
#include <linux/buffer_head.h>
#include "inode.h"
#include "debug.h"
#include "ntfs.h"
......
......@@ -373,7 +373,7 @@ void ntfs_destroy_extent_inode(ntfs_inode *ni)
*
* Return zero on success and -ENOMEM on error.
*/
static void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni)
void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni)
{
ntfs_debug("Entering.");
ni->initialized_size = ni->allocated_size = 0;
......@@ -396,17 +396,6 @@ static void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni)
init_MUTEX(&ni->extent_lock);
ni->nr_extents = 0;
ni->ext.base_ntfs_ino = NULL;
return;
}
static inline void ntfs_init_big_inode(struct inode *vi)
{
ntfs_inode *ni = NTFS_I(vi);
ntfs_debug("Entering.");
__ntfs_init_inode(vi->i_sb, ni);
ni->mft_no = vi->i_ino;
return;
}
inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
......
......@@ -35,6 +35,7 @@
#include "volume.h"
#include "types.h"
#include "runlist.h"
#include "debug.h"
typedef struct _ntfs_inode ntfs_inode;
......@@ -276,6 +277,17 @@ extern struct inode *ntfs_alloc_big_inode(struct super_block *sb);
extern void ntfs_destroy_big_inode(struct inode *inode);
extern void ntfs_clear_big_inode(struct inode *vi);
extern void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni);
static inline void ntfs_init_big_inode(struct inode *vi)
{
ntfs_inode *ni = NTFS_I(vi);
ntfs_debug("Entering.");
__ntfs_init_inode(vi->i_sb, ni);
ni->mft_no = vi->i_ino;
}
extern ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
unsigned long mft_no);
extern void ntfs_clear_extent_inode(ntfs_inode *ni);
......
......@@ -27,11 +27,12 @@
#include <linux/buffer_head.h>
#include <linux/bitops.h>
#include "logfile.h"
#include "volume.h"
#include "attrib.h"
#include "aops.h"
#include "debug.h"
#include "logfile.h"
#include "malloc.h"
#include "volume.h"
#include "ntfs.h"
/**
......
......@@ -23,12 +23,14 @@
#include <linux/buffer_head.h>
#include <linux/swap.h>
#include "bitmap.h"
#include "lcnalloc.h"
#include "attrib.h"
#include "aops.h"
#include "bitmap.h"
#include "debug.h"
#include "mft.h"
#include "dir.h"
#include "lcnalloc.h"
#include "malloc.h"
#include "mft.h"
#include "ntfs.h"
/**
......
......@@ -23,8 +23,9 @@
#include <linux/dcache.h>
#include <linux/security.h>
#include "dir.h"
#include "attrib.h"
#include "debug.h"
#include "dir.h"
#include "mft.h"
#include "ntfs.h"
......
......@@ -20,8 +20,9 @@
* Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "dir.h"
#include "debug.h"
#include "dir.h"
#include "endian.h"
#include "malloc.h"
#include "ntfs.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment