#ifndef GEOIPH_H #define GEOIPH_H #include #include #include "config.h" #include "die.h" #if defined(HAVE_GEOIP) && defined(HAVE_LIBZ) extern void init_geoip(int enforce); extern void update_geoip(void); extern int geoip_working(void); extern char *geoip4_city_name(struct sockaddr_in *sa); extern char *geoip6_city_name(struct sockaddr_in6 *sa); extern char *geoip4_region_name(struct sockaddr_in *sa); extern char *geoip6_region_name(struct sockaddr_in6 *sa); extern const char *geoip4_country_name(struct sockaddr_in *sa); extern const char *geoip6_country_name(struct sockaddr_in6 *sa); extern const char *geoip4_country_code3_name(struct sockaddr_in *sa); extern const char *geoip6_country_code3_name(struct sockaddr_in6 *sa); extern float geoip4_longitude(struct sockaddr_in *sa); extern float geoip4_latitude(struct sockaddr_in *sa); extern float geoip6_longitude(struct sockaddr_in6 *sa); extern float geoip6_latitude(struct sockaddr_in6 *sa); extern const char *geoip4_as_name(struct sockaddr_in *sa); extern const char *geoip6_as_name(struct sockaddr_in6 *sa); extern void destroy_geoip(void); #else static inline void init_geoip(int enforce) { } static inline void destroy_geoip(void) { } static inline void update_geoip(void) { panic("No built-in geoip support!\n"); } static inline int geoip_working(void) { return 0; } static inline char *geoip4_city_name(struct sockaddr_in *sa) { return NULL; } static inline char *geoip6_city_name(struct sockaddr_in6 *sa) { return NULL; } static inline char *geoip4_region_name(struct sockaddr_in *sa) { return NULL; } static inline char *geoip6_region_name(struct sockaddr_in6 *sa) { return NULL; } static inline const char *geoip4_country_name(struct sockaddr_in *sa) { return NULL; } static inline const char *geoip6_country_name(struct sockaddr_in6 *sa) { return NULL; } static inline float geoip4_longitude(struct sockaddr_in *sa) { return .0f; } static inline float geoip4_latitude(struct sockaddr_in *sa) { return .0f; } static inline float geoip6_longitude(struct sockaddr_in6 *sa) { return .0f; } static inline float geoip6_latitude(struct sockaddr_in6 *sa) { return .0f; } static inline const char *geoip4_as_name(struct sockaddr_in *sa) { return NULL; } static inline const char *geoip6_as_name(struct sockaddr_in6 *sa) { return NULL; } static inline const char *geoip4_country_code3_name(struct sockaddr_in *sa) { return NULL; } static inline const char *geoip6_country_code3_name(struct sockaddr_in6 *sa) { return NULL; } #endif #endif /* GEOIPH_H */ sg
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2016-10-24 15:13:25 -0400
committerJens Axboe <axboe@fb.com>2016-10-24 13:18:14 -0600
commit423221d1745b53656db896bd34646d09d620c759 (patch)
tree69d4f88319c80ea44db52ad5312e2fde14e6106d /Documentation
parentb4a1278c78bc939b3e29c3ad21ceaa636b0ca8c8 (diff)
nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown
Commit 0eadf37afc250 ("nbd: allow block mq to deal with timeouts") changed normal usage of nbd->sock_lock to use spin_lock/spin_unlock rather than the *_irq variants, but it missed this unlock in an error path. Found by Coverity, CID 1373871. Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Josef Bacik <jbacik@fb.com> Cc: Jens Axboe <axboe@fb.com> Cc: Markus Pargmann <mpa@pengutronix.de> Fixes: 0eadf37afc250 ("nbd: allow block mq to deal with timeouts") Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'Documentation')