X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Freiserfs_xattr.h;h=af135ae895db2d3523839c5f1a0857ed54db3aca;hb=04a0551c87363f100b04d28d7a15a632b70e18e7;hp=5e961035c72576052cec535a48faf0814719f809;hpb=075395d228641646159dae3dd170fa3fc6ff477a;p=linux-2.6 diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 5e961035c7..af135ae895 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h @@ -2,7 +2,10 @@ File: linux/reiserfs_xattr.h */ -#include +#ifndef _LINUX_REISERFS_XATTR_H +#define _LINUX_REISERFS_XATTR_H + +#include /* Magic value in header */ #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ @@ -13,7 +16,18 @@ struct reiserfs_xattr_header { }; #ifdef __KERNEL__ + #include +#include +#include +#include +#include + +struct inode; +struct dentry; +struct iattr; +struct super_block; +struct nameidata; struct reiserfs_xattr_handler { char *prefix; @@ -41,7 +55,7 @@ int reiserfs_removexattr(struct dentry *dentry, const char *name); int reiserfs_delete_xattrs(struct inode *inode); int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); int reiserfs_xattr_init(struct super_block *sb, int mount_flags); -int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); +int reiserfs_permission(struct inode *inode, int mask); int reiserfs_xattr_del(struct inode *, const char *); int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); @@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); extern struct reiserfs_xattr_handler user_handler; extern struct reiserfs_xattr_handler trusted_handler; -#ifdef CONFIG_REISERFS_FS_SECURITY extern struct reiserfs_xattr_handler security_handler; -#endif int reiserfs_xattr_register_handlers(void) __init; void reiserfs_xattr_unregister_handlers(void); @@ -97,6 +109,11 @@ static inline void reiserfs_mark_inode_private(struct inode *inode) inode->i_flags |= S_PRIVATE; } +static inline void reiserfs_init_xattr_rwsem(struct inode *inode) +{ + init_rwsem(&REISERFS_I(inode)->xattr_sem); +} + #else #define is_reiserfs_priv_object(inode) 0 @@ -129,6 +146,11 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */ return 0; }; -#endif +static inline void reiserfs_init_xattr_rwsem(struct inode *inode) +{ +} +#endif /* CONFIG_REISERFS_FS_XATTR */ + +#endif /* __KERNEL__ */ -#endif /* __KERNEL__ */ +#endif /* _LINUX_REISERFS_XATTR_H */