aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_xattr.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 23:21:28 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 23:21:28 -0400
commitbd4c625c061c2a38568d0add3478f59172455159 (patch)
tree1c44a17c55bce2ee7ad5ea3d15a208ecc0955f74 /include/linux/reiserfs_xattr.h
parent7fa94c8868edfef8cb6a201fcc9a5078b7b961da (diff)
reiserfs: run scripts/Lindent on reiserfs code
This was a pure indentation change, using: scripts/Lindent fs/reiserfs/*.c include/linux/reiserfs_*.h to make reiserfs match the regular Linux indentation style. As Jeff Mahoney <jeffm@suse.com> writes: The ReiserFS code is a mix of a number of different coding styles, sometimes different even from line-to-line. Since the code has been relatively stable for quite some time and there are few outstanding patches to be applied, it is time to reformat the code to conform to the Linux style standard outlined in Documentation/CodingStyle. This patch contains the result of running scripts/Lindent against fs/reiserfs/*.c and include/linux/reiserfs_*.h. There are places where the code can be made to look better, but I'd rather keep those patches separate so that there isn't a subtle by-hand hand accident in the middle of a huge patch. To be clear: This patch is reformatting *only*. A number of patches may follow that continue to make the code more consistent with the Linux coding style. Hans wasn't particularly enthusiastic about these patches, but said he wouldn't really oppose them either. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/reiserfs_xattr.h')
-rw-r--r--include/linux/reiserfs_xattr.h126
1 files changed, 62 insertions, 64 deletions
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 9244c5748820..c84354e8374c 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -7,48 +7,48 @@
7#include <linux/xattr.h> 7#include <linux/xattr.h>
8 8
9/* Magic value in header */ 9/* Magic value in header */
10#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ 10#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */
11 11
12struct reiserfs_xattr_header { 12struct reiserfs_xattr_header {
13 __le32 h_magic; /* magic number for identification */ 13 __le32 h_magic; /* magic number for identification */
14 __le32 h_hash; /* hash of the value */ 14 __le32 h_hash; /* hash of the value */
15}; 15};
16 16
17#ifdef __KERNEL__ 17#ifdef __KERNEL__
18 18
19struct reiserfs_xattr_handler { 19struct reiserfs_xattr_handler {
20 char *prefix; 20 char *prefix;
21 int (*init)(void); 21 int (*init) (void);
22 void (*exit)(void); 22 void (*exit) (void);
23 int (*get)(struct inode *inode, const char *name, void *buffer, 23 int (*get) (struct inode * inode, const char *name, void *buffer,
24 size_t size); 24 size_t size);
25 int (*set)(struct inode *inode, const char *name, const void *buffer, 25 int (*set) (struct inode * inode, const char *name, const void *buffer,
26 size_t size, int flags); 26 size_t size, int flags);
27 int (*del)(struct inode *inode, const char *name); 27 int (*del) (struct inode * inode, const char *name);
28 int (*list)(struct inode *inode, const char *name, int namelen, char *out); 28 int (*list) (struct inode * inode, const char *name, int namelen,
29 struct list_head handlers; 29 char *out);
30 struct list_head handlers;
30}; 31};
31 32
32
33#ifdef CONFIG_REISERFS_FS_XATTR 33#ifdef CONFIG_REISERFS_FS_XATTR
34#define is_reiserfs_priv_object(inode) IS_PRIVATE(inode) 34#define is_reiserfs_priv_object(inode) IS_PRIVATE(inode)
35#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) 35#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)
36ssize_t reiserfs_getxattr (struct dentry *dentry, const char *name, 36ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name,
37 void *buffer, size_t size); 37 void *buffer, size_t size);
38int reiserfs_setxattr (struct dentry *dentry, const char *name, 38int reiserfs_setxattr(struct dentry *dentry, const char *name,
39 const void *value, size_t size, int flags); 39 const void *value, size_t size, int flags);
40ssize_t reiserfs_listxattr (struct dentry *dentry, char *buffer, size_t size); 40ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
41int reiserfs_removexattr (struct dentry *dentry, const char *name); 41int reiserfs_removexattr(struct dentry *dentry, const char *name);
42int reiserfs_delete_xattrs (struct inode *inode); 42int reiserfs_delete_xattrs(struct inode *inode);
43int reiserfs_chown_xattrs (struct inode *inode, struct iattr *attrs); 43int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs);
44int reiserfs_xattr_init (struct super_block *sb, int mount_flags); 44int reiserfs_xattr_init(struct super_block *sb, int mount_flags);
45int reiserfs_permission (struct inode *inode, int mask, struct nameidata *nd); 45int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd);
46int reiserfs_permission_locked (struct inode *inode, int mask, struct nameidata *nd); 46int reiserfs_permission_locked(struct inode *inode, int mask,
47 47 struct nameidata *nd);
48int reiserfs_xattr_del (struct inode *, const char *); 48
49int reiserfs_xattr_get (const struct inode *, const char *, void *, size_t); 49int reiserfs_xattr_del(struct inode *, const char *);
50int reiserfs_xattr_set (struct inode *, const char *, const void *, 50int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t);
51 size_t, int); 51int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int);
52 52
53extern struct reiserfs_xattr_handler user_handler; 53extern struct reiserfs_xattr_handler user_handler;
54extern struct reiserfs_xattr_handler trusted_handler; 54extern struct reiserfs_xattr_handler trusted_handler;
@@ -56,57 +56,48 @@ extern struct reiserfs_xattr_handler trusted_handler;
56extern struct reiserfs_xattr_handler security_handler; 56extern struct reiserfs_xattr_handler security_handler;
57#endif 57#endif
58 58
59int reiserfs_xattr_register_handlers (void) __init; 59int reiserfs_xattr_register_handlers(void) __init;
60void reiserfs_xattr_unregister_handlers (void); 60void reiserfs_xattr_unregister_handlers(void);
61 61
62static inline void 62static inline void reiserfs_write_lock_xattrs(struct super_block *sb)
63reiserfs_write_lock_xattrs(struct super_block *sb)
64{ 63{
65 down_write (&REISERFS_XATTR_DIR_SEM(sb)); 64 down_write(&REISERFS_XATTR_DIR_SEM(sb));
66} 65}
67static inline void 66static inline void reiserfs_write_unlock_xattrs(struct super_block *sb)
68reiserfs_write_unlock_xattrs(struct super_block *sb)
69{ 67{
70 up_write (&REISERFS_XATTR_DIR_SEM(sb)); 68 up_write(&REISERFS_XATTR_DIR_SEM(sb));
71} 69}
72static inline void 70static inline void reiserfs_read_lock_xattrs(struct super_block *sb)
73reiserfs_read_lock_xattrs(struct super_block *sb)
74{ 71{
75 down_read (&REISERFS_XATTR_DIR_SEM(sb)); 72 down_read(&REISERFS_XATTR_DIR_SEM(sb));
76} 73}
77 74
78static inline void 75static inline void reiserfs_read_unlock_xattrs(struct super_block *sb)
79reiserfs_read_unlock_xattrs(struct super_block *sb)
80{ 76{
81 up_read (&REISERFS_XATTR_DIR_SEM(sb)); 77 up_read(&REISERFS_XATTR_DIR_SEM(sb));
82} 78}
83 79
84static inline void 80static inline void reiserfs_write_lock_xattr_i(struct inode *inode)
85reiserfs_write_lock_xattr_i(struct inode *inode)
86{ 81{
87 down_write (&REISERFS_I(inode)->xattr_sem); 82 down_write(&REISERFS_I(inode)->xattr_sem);
88} 83}
89static inline void 84static inline void reiserfs_write_unlock_xattr_i(struct inode *inode)
90reiserfs_write_unlock_xattr_i(struct inode *inode)
91{ 85{
92 up_write (&REISERFS_I(inode)->xattr_sem); 86 up_write(&REISERFS_I(inode)->xattr_sem);
93} 87}
94static inline void 88static inline void reiserfs_read_lock_xattr_i(struct inode *inode)
95reiserfs_read_lock_xattr_i(struct inode *inode)
96{ 89{
97 down_read (&REISERFS_I(inode)->xattr_sem); 90 down_read(&REISERFS_I(inode)->xattr_sem);
98} 91}
99 92
100static inline void 93static inline void reiserfs_read_unlock_xattr_i(struct inode *inode)
101reiserfs_read_unlock_xattr_i(struct inode *inode)
102{ 94{
103 up_read (&REISERFS_I(inode)->xattr_sem); 95 up_read(&REISERFS_I(inode)->xattr_sem);
104} 96}
105 97
106static inline void 98static inline void reiserfs_mark_inode_private(struct inode *inode)
107reiserfs_mark_inode_private(struct inode *inode)
108{ 99{
109 inode->i_flags |= S_PRIVATE; 100 inode->i_flags |= S_PRIVATE;
110} 101}
111 102
112#else 103#else
@@ -127,13 +118,20 @@ reiserfs_mark_inode_private(struct inode *inode)
127#define reiserfs_xattr_register_handlers() 0 118#define reiserfs_xattr_register_handlers() 0
128#define reiserfs_xattr_unregister_handlers() 119#define reiserfs_xattr_unregister_handlers()
129 120
130static inline int reiserfs_delete_xattrs (struct inode *inode) { return 0; }; 121static inline int reiserfs_delete_xattrs(struct inode *inode)
131static inline int reiserfs_chown_xattrs (struct inode *inode, struct iattr *attrs) { return 0; }; 122{
132static inline int reiserfs_xattr_init (struct super_block *sb, int mount_flags) 123 return 0;
124};
125static inline int reiserfs_chown_xattrs(struct inode *inode,
126 struct iattr *attrs)
127{
128 return 0;
129};
130static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
133{ 131{
134 sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */ 132 sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */
135 return 0; 133 return 0;
136}; 134};
137#endif 135#endif
138 136
139#endif /* __KERNEL__ */ 137#endif /* __KERNEL__ */