Commit 2722e5dd authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Move typedefs for ntfs_attr and test_t from fs/ntfs/inode.c to

      fs/ntfs/inode.h so they can be used elsewhere.
parent b5607911
......@@ -33,6 +33,8 @@ ToDo:
- Wrap flush_dcache_mft_record_page() in #ifdef NTFS_RW.
- Add NInoTestSetFoo() and NInoTestClearFoo() macro magic to
fs/ntfs/inode.h and use it to declare NInoTest{Set,Clear}Dirty.
- Move typedefs for ntfs_attr and test_t from fs/ntfs/inode.c to
fs/ntfs/inode.h so they can be used elsewhere.
2.1.7 - Enable NFS exporting of mounted NTFS volumes.
......
......@@ -31,26 +31,6 @@
#include "attrib.h"
#include "time.h"
/**
* ntfs_attr - ntfs in memory attribute structure
* @mft_no: mft record number of the base mft record of this attribute
* @name: Unicode name of the attribute (NULL if unnamed)
* @name_len: length of @name in Unicode characters (0 if unnamed)
* @type: attribute type (see layout.h)
*
* This structure exists only to provide a small structure for the
* ntfs_{attr_}iget()/ntfs_test_inode()/ntfs_init_locked_inode() mechanism.
*
* NOTE: Elements are ordered by size to make the structure as compact as
* possible on all architectures.
*/
typedef struct {
unsigned long mft_no;
uchar_t *name;
u32 name_len;
ATTR_TYPES type;
} ntfs_attr;
/**
* ntfs_test_inode - compare two (possibly fake) inodes for equality
* @vi: vfs inode which to test
......@@ -67,7 +47,7 @@ typedef struct {
* NOTE: This function runs with the inode_lock spin lock held so it is not
* allowed to sleep.
*/
static int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
{
ntfs_inode *ni;
......@@ -151,7 +131,6 @@ static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
return 0;
}
typedef int (*test_t)(struct inode *, void *);
typedef int (*set_t)(struct inode *, void *);
static int ntfs_read_locked_inode(struct inode *vi);
static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi);
......
......@@ -233,6 +233,30 @@ static inline struct inode *VFS_I(ntfs_inode *ni)
return &((big_ntfs_inode *)ni)->vfs_inode;
}
/**
* ntfs_attr - ntfs in memory attribute structure
* @mft_no: mft record number of the base mft record of this attribute
* @name: Unicode name of the attribute (NULL if unnamed)
* @name_len: length of @name in Unicode characters (0 if unnamed)
* @type: attribute type (see layout.h)
*
* This structure exists only to provide a small structure for the
* ntfs_{attr_}iget()/ntfs_test_inode()/ntfs_init_locked_inode() mechanism.
*
* NOTE: Elements are ordered by size to make the structure as compact as
* possible on all architectures.
*/
typedef struct {
unsigned long mft_no;
uchar_t *name;
u32 name_len;
ATTR_TYPES type;
} ntfs_attr;
typedef int (*test_t)(struct inode *, void *);
extern int ntfs_test_inode(struct inode *vi, ntfs_attr *na);
extern struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no);
extern struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPES type,
uchar_t *name, u32 name_len);
......
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