From: Al Viro Date: Tue, 10 Oct 2006 21:47:57 +0000 (+0100) Subject: [PATCH] gfp annotations: radix_tree_root X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~44320 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=20241ad409fbc42d9e7f92f5fdb4783b7f1b36eb;p=mirror_ubuntu-artful-kernel.git [PATCH] gfp annotations: radix_tree_root struct radix_tree_root has unused upper bits of ->gfp_mask reused for tags bitmap. Annotated. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 637d55608de5..aa9bfd0bdbd1 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -160,13 +160,13 @@ static inline int tag_get(struct radix_tree_node *node, unsigned int tag, static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag) { - root->gfp_mask |= (1 << (tag + __GFP_BITS_SHIFT)); + root->gfp_mask |= (__force gfp_t)(1 << (tag + __GFP_BITS_SHIFT)); } static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag) { - root->gfp_mask &= ~(1 << (tag + __GFP_BITS_SHIFT)); + root->gfp_mask &= (__force gfp_t)~(1 << (tag + __GFP_BITS_SHIFT)); } static inline void root_tag_clear_all(struct radix_tree_root *root) @@ -176,7 +176,7 @@ static inline void root_tag_clear_all(struct radix_tree_root *root) static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag) { - return root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT)); + return (__force unsigned)root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT)); } /*