#include #include #include #include #include struct inode; struct dentry; struct iattr; struct super_block; int reiserfs_xattr_register_handlers(void) __init; void reiserfs_xattr_unregister_handlers(void); int reiserfs_xattr_init(struct super_block *sb, int mount_flags); int reiserfs_lookup_privroot(struct super_block *sb); int reiserfs_delete_xattrs(struct inode *inode); int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); int reiserfs_permission(struct inode *inode, int mask); #ifdef CONFIG_REISERFS_FS_XATTR #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size); int reiserfs_xattr_get(struct inode *, const char *, void *, size_t); int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); int reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *, struct inode *, const char *, const void *, size_t, int); extern const struct xattr_handler reiserfs_xattr_user_handler; extern const struct xattr_handler reiserfs_xattr_trusted_handler; extern const struct xattr_handler reiserfs_xattr_security_handler; #ifdef CONFIG_REISERFS_FS_SECURITY int reiserfs_security_init(struct inode *dir, struct inode *inode, const struct qstr *qstr, struct reiserfs_security_handle *sec); int reiserfs_security_write(struct reiserfs_transaction_handle *th, struct inode *inode, struct reiserfs_security_handle *sec); void reiserfs_security_free(struct reiserfs_security_handle *sec); #endif static inline int reiserfs_xattrs_initialized(struct super_block *sb) { return REISERFS_SB(sb)->priv_root != NULL; } #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) { loff_t ret = 0; if (reiserfs_file_data_log(inode)) { ret = _ROUND_UP(xattr_size(size), inode->i_sb->s_blocksize); ret >>= inode->i_sb->s_blocksize_bits; } return ret; } /* * We may have to create up to 3 objects: xattr root, xattr dir, xattr file. * Let's try to be smart about it. * xattr root: We cache it. If it's not cached, we may need to create it. * xattr dir: If anything has been loaded for this inode, we can set a flag * saying so. * xattr file: Since we don't cache xattrs, we can't tell. We always include * blocks for it. * * However, since root and dir can be created between calls - YOU MUST SAVE * THIS VALUE. */ static inline size_t reiserfs_xattr_jcreate_nblocks(struct inode *inode) { size_t nblocks = JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) { nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); if (d_really_is_negative(REISERFS_SB(inode->i_sb)->xattr_root)) nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); } return nblocks; } static inline void reiserfs_init_xattr_rwsem(struct inode *inode) { init_rwsem(&REISERFS_I(inode)->i_xattr_sem); } #else #define reiserfs_listxattr NULL static inline void reiserfs_init_xattr_rwsem(struct inode *inode) { } #endif /* CONFIG_REISERFS_FS_XATTR */ #ifndef CONFIG_REISERFS_FS_SECURITY static inline int reiserfs_security_init(struct inode *dir, struct inode *inode, const struct qstr *qstr, struct reiserfs_security_handle *sec) { return 0; } static inline int reiserfs_security_write(struct reiserfs_transaction_handle *th, struct inode *inode, struct reiserfs_security_handle *sec) { return 0; } static inline void reiserfs_security_free(struct reiserfs_security_handle *sec) {} #endif option>space:mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-01-12 17:15:56 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-01-30 10:17:32 +0100
commite6e7b48b295afa5a5ab440de0a94d9ad8b3ce2d0 (patch)
tree77cadb6d8aad1b52c34e4afa8c9deef603bbe2ed /net/ipv4/tcp_vegas.h
parent4e5b54f127426c82dc2816340c26d951a5bb3429 (diff)
drm: Don't race connector registration
I was under the misconception that the sysfs dev stuff can be fully set up, and then registered all in one step with device_add. That's true for properties and property groups, but not for parents and child devices. Those must be fully registered before you can register a child. Add a bit of tracking to make sure that asynchronous mst connector hotplugging gets this right. For consistency we rely upon the implicit barriers of the connector->mutex, which is taken anyway, to ensure that at least either the connector or device registration call will work out. Mildly tested since I can't reliably reproduce this on my mst box here. Reported-by: Dave Hansen <dave.hansen@intel.com> Cc: Dave Hansen <dave.hansen@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1484237756-2720-1-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'net/ipv4/tcp_vegas.h')