summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2009-02-25 11:32:52 +0100
committerDavid S. Miller <davem@davemloft.net>2009-02-27 08:13:35 +0100
commit56bca31ff1989aa8b60f717e984b0e624f06324e (patch)
tree574eb3761f17c037dbed7674420873f1f5a879ce
parentdecnet: fix sparse warnings: symbol shadows an earlier one (diff)
downloadlinux-56bca31ff1989aa8b60f717e984b0e624f06324e.tar.xz
linux-56bca31ff1989aa8b60f717e984b0e624f06324e.zip
inet fragments: fix sparse warning: context imbalance
Impact: Attribute function with __releases(...) Fix this sparse warning: net/ipv4/inet_fragment.c:276:35: warning: context imbalance in 'inet_frag_find' - unexpected unlock Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/inet_frag.h3
-rw-r--r--net/ipv4/inet_fragment.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index e081eefd6f47..39f2dc943908 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -61,7 +61,8 @@ void inet_frag_destroy(struct inet_frag_queue *q,
struct inet_frags *f, int *work);
int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f);
struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
- struct inet_frags *f, void *key, unsigned int hash);
+ struct inet_frags *f, void *key, unsigned int hash)
+ __releases(&f->lock);
static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f)
{
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 6c52e08f786e..eaf3e2c8646a 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -267,6 +267,7 @@ static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf,
struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
struct inet_frags *f, void *key, unsigned int hash)
+ __releases(&f->lock)
{
struct inet_frag_queue *q;
struct hlist_node *n;