]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Tiger Yang <tiger.yang@oracle.com> |
2 | Date: Thu, 23 Oct 2008 16:33:33 +0800 | |
3 | Subject: ocfs2: fix function declaration and definition in xattr | |
4 | ||
5 | Because we merged the xattr sources into one file, some functions | |
6 | no longer belong in the header file. | |
7 | ||
8 | Signed-off-by: Tiger Yang <tiger.yang@oracle.com> | |
9 | Signed-off-by: Joel Becker <joel.becker@oracle.com> | |
10 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
11 | --- | |
12 | fs/ocfs2/xattr.c | 28 +++++++++++++++++++++++----- | |
13 | fs/ocfs2/xattr.h | 26 ++++---------------------- | |
14 | 2 files changed, 27 insertions(+), 27 deletions(-) | |
15 | ||
16 | diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c | |
17 | index 2f8952e..420d8e3 100644 | |
18 | --- a/fs/ocfs2/xattr.c | |
19 | +++ b/fs/ocfs2/xattr.c | |
20 | @@ -132,6 +132,24 @@ static int ocfs2_xattr_set_entry_index_block(struct inode *inode, | |
21 | static int ocfs2_delete_xattr_index_block(struct inode *inode, | |
22 | struct buffer_head *xb_bh); | |
23 | ||
24 | +static inline u16 ocfs2_xattr_buckets_per_cluster(struct ocfs2_super *osb) | |
25 | +{ | |
26 | + return (1 << osb->s_clustersize_bits) / OCFS2_XATTR_BUCKET_SIZE; | |
27 | +} | |
28 | + | |
29 | +static inline u16 ocfs2_blocks_per_xattr_bucket(struct super_block *sb) | |
30 | +{ | |
31 | + return OCFS2_XATTR_BUCKET_SIZE / (1 << sb->s_blocksize_bits); | |
32 | +} | |
33 | + | |
34 | +static inline u16 ocfs2_xattr_max_xe_in_bucket(struct super_block *sb) | |
35 | +{ | |
36 | + u16 len = sb->s_blocksize - | |
37 | + offsetof(struct ocfs2_xattr_header, xh_entries); | |
38 | + | |
39 | + return len / sizeof(struct ocfs2_xattr_entry); | |
40 | +} | |
41 | + | |
42 | static inline const char *ocfs2_xattr_prefix(int name_index) | |
43 | { | |
44 | struct xattr_handler *handler = NULL; | |
45 | @@ -832,11 +850,11 @@ cleanup: | |
46 | * Copy an extended attribute into the buffer provided. | |
47 | * Buffer is NULL to compute the size of buffer required. | |
48 | */ | |
49 | -int ocfs2_xattr_get(struct inode *inode, | |
50 | - int name_index, | |
51 | - const char *name, | |
52 | - void *buffer, | |
53 | - size_t buffer_size) | |
54 | +static int ocfs2_xattr_get(struct inode *inode, | |
55 | + int name_index, | |
56 | + const char *name, | |
57 | + void *buffer, | |
58 | + size_t buffer_size) | |
59 | { | |
60 | int ret; | |
61 | struct ocfs2_dinode *di = NULL; | |
62 | diff --git a/fs/ocfs2/xattr.h b/fs/ocfs2/xattr.h | |
63 | index e4e45c8..1d8314c 100644 | |
64 | --- a/fs/ocfs2/xattr.h | |
65 | +++ b/fs/ocfs2/xattr.h | |
66 | @@ -32,29 +32,11 @@ enum ocfs2_xattr_type { | |
67 | ||
68 | extern struct xattr_handler ocfs2_xattr_user_handler; | |
69 | extern struct xattr_handler ocfs2_xattr_trusted_handler; | |
70 | - | |
71 | -extern ssize_t ocfs2_listxattr(struct dentry *, char *, size_t); | |
72 | -extern int ocfs2_xattr_get(struct inode *, int, const char *, void *, size_t); | |
73 | -extern int ocfs2_xattr_set(struct inode *, int, const char *, const void *, | |
74 | - size_t, int); | |
75 | -extern int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh); | |
76 | extern struct xattr_handler *ocfs2_xattr_handlers[]; | |
77 | ||
78 | -static inline u16 ocfs2_xattr_buckets_per_cluster(struct ocfs2_super *osb) | |
79 | -{ | |
80 | - return (1 << osb->s_clustersize_bits) / OCFS2_XATTR_BUCKET_SIZE; | |
81 | -} | |
82 | - | |
83 | -static inline u16 ocfs2_blocks_per_xattr_bucket(struct super_block *sb) | |
84 | -{ | |
85 | - return OCFS2_XATTR_BUCKET_SIZE / (1 << sb->s_blocksize_bits); | |
86 | -} | |
87 | - | |
88 | -static inline u16 ocfs2_xattr_max_xe_in_bucket(struct super_block *sb) | |
89 | -{ | |
90 | - u16 len = sb->s_blocksize - | |
91 | - offsetof(struct ocfs2_xattr_header, xh_entries); | |
92 | +ssize_t ocfs2_listxattr(struct dentry *, char *, size_t); | |
93 | +int ocfs2_xattr_set(struct inode *, int, const char *, const void *, | |
94 | + size_t, int); | |
95 | +int ocfs2_xattr_remove(struct inode *, struct buffer_head *); | |
96 | ||
97 | - return len / sizeof(struct ocfs2_xattr_entry); | |
98 | -} | |
99 | #endif /* OCFS2_XATTR_H */ | |
100 | -- | |
101 | 1.5.6 | |
102 |