aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorTiger Yang <tiger.yang@oracle.com>2008-10-23 04:33:33 -0400
committerMark Fasheh <mfasheh@suse.com>2008-11-10 12:51:44 -0500
commit0030e001505d2d1503c083c917a747c033eaf8cd (patch)
tree03c08d7cadeddc8c597ff0054da49e3bb1cfd278 /fs/ocfs2
parentc3cb6827353102fee62f3b9401a03ee29b297e5b (diff)
ocfs2: fix function declaration and definition in xattr
Because we merged the xattr sources into one file, some functions no longer belong in the header file. Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/xattr.c28
-rw-r--r--fs/ocfs2/xattr.h26
2 files changed, 27 insertions, 27 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 2f8952e4e4c1..420d8e30b184 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -132,6 +132,24 @@ static int ocfs2_xattr_set_entry_index_block(struct inode *inode,
132static int ocfs2_delete_xattr_index_block(struct inode *inode, 132static int ocfs2_delete_xattr_index_block(struct inode *inode,
133 struct buffer_head *xb_bh); 133 struct buffer_head *xb_bh);
134 134
135static inline u16 ocfs2_xattr_buckets_per_cluster(struct ocfs2_super *osb)
136{
137 return (1 << osb->s_clustersize_bits) / OCFS2_XATTR_BUCKET_SIZE;
138}
139
140static inline u16 ocfs2_blocks_per_xattr_bucket(struct super_block *sb)
141{
142 return OCFS2_XATTR_BUCKET_SIZE / (1 << sb->s_blocksize_bits);
143}
144
145static inline u16 ocfs2_xattr_max_xe_in_bucket(struct super_block *sb)
146{
147 u16 len = sb->s_blocksize -
148 offsetof(struct ocfs2_xattr_header, xh_entries);
149
150 return len / sizeof(struct ocfs2_xattr_entry);
151}
152
135static inline const char *ocfs2_xattr_prefix(int name_index) 153static inline const char *ocfs2_xattr_prefix(int name_index)
136{ 154{
137 struct xattr_handler *handler = NULL; 155 struct xattr_handler *handler = NULL;
@@ -832,11 +850,11 @@ cleanup:
832 * Copy an extended attribute into the buffer provided. 850 * Copy an extended attribute into the buffer provided.
833 * Buffer is NULL to compute the size of buffer required. 851 * Buffer is NULL to compute the size of buffer required.
834 */ 852 */
835int ocfs2_xattr_get(struct inode *inode, 853static int ocfs2_xattr_get(struct inode *inode,
836 int name_index, 854 int name_index,
837 const char *name, 855 const char *name,
838 void *buffer, 856 void *buffer,
839 size_t buffer_size) 857 size_t buffer_size)
840{ 858{
841 int ret; 859 int ret;
842 struct ocfs2_dinode *di = NULL; 860 struct ocfs2_dinode *di = NULL;
diff --git a/fs/ocfs2/xattr.h b/fs/ocfs2/xattr.h
index e4e45c81a261..1d8314c7656d 100644
--- a/fs/ocfs2/xattr.h
+++ b/fs/ocfs2/xattr.h
@@ -32,29 +32,11 @@ enum ocfs2_xattr_type {
32 32
33extern struct xattr_handler ocfs2_xattr_user_handler; 33extern struct xattr_handler ocfs2_xattr_user_handler;
34extern struct xattr_handler ocfs2_xattr_trusted_handler; 34extern struct xattr_handler ocfs2_xattr_trusted_handler;
35
36extern ssize_t ocfs2_listxattr(struct dentry *, char *, size_t);
37extern int ocfs2_xattr_get(struct inode *, int, const char *, void *, size_t);
38extern int ocfs2_xattr_set(struct inode *, int, const char *, const void *,
39 size_t, int);
40extern int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh);
41extern struct xattr_handler *ocfs2_xattr_handlers[]; 35extern struct xattr_handler *ocfs2_xattr_handlers[];
42 36
43static inline u16 ocfs2_xattr_buckets_per_cluster(struct ocfs2_super *osb) 37ssize_t ocfs2_listxattr(struct dentry *, char *, size_t);
44{ 38int ocfs2_xattr_set(struct inode *, int, const char *, const void *,
45 return (1 << osb->s_clustersize_bits) / OCFS2_XATTR_BUCKET_SIZE; 39 size_t, int);
46} 40int ocfs2_xattr_remove(struct inode *, struct buffer_head *);
47
48static inline u16 ocfs2_blocks_per_xattr_bucket(struct super_block *sb)
49{
50 return OCFS2_XATTR_BUCKET_SIZE / (1 << sb->s_blocksize_bits);
51}
52
53static inline u16 ocfs2_xattr_max_xe_in_bucket(struct super_block *sb)
54{
55 u16 len = sb->s_blocksize -
56 offsetof(struct ocfs2_xattr_header, xh_entries);
57 41
58 return len / sizeof(struct ocfs2_xattr_entry);
59}
60#endif /* OCFS2_XATTR_H */ 42#endif /* OCFS2_XATTR_H */