Showing error 1548

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: net/sunrpc/cache.c
Line in file: 1168
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

1138        while (*bp == ' ') bp++;
1139        *bpp = bp;
1140        *dest = '\0';
1141        return len;
1142}
1143EXPORT_SYMBOL(qword_get);
1144
1145
1146/*
1147 * support /proc/sunrpc/cache/$CACHENAME/content
1148 * as a seqfile.
1149 * We call ->cache_show passing NULL for the item to
1150 * get a header, then pass each real item in the cache
1151 */
1152
1153struct handle {
1154        struct cache_detail *cd;
1155};
1156
1157static void *c_start(struct seq_file *m, loff_t *pos)
1158        __acquires(cd->hash_lock)
1159{
1160        loff_t n = *pos;
1161        unsigned hash, entry;
1162        struct cache_head *ch;
1163        struct cache_detail *cd = ((struct handle*)m->private)->cd;
1164
1165
1166        read_lock(&cd->hash_lock);
1167        if (!n--)
1168                return SEQ_START_TOKEN;
1169        hash = n >> 32;
1170        entry = n & ((1LL<<32) - 1);
1171
1172        for (ch=cd->hash_table[hash]; ch; ch=ch->next)
1173                if (!entry--)
1174                        return ch;
1175        n &= ~((1LL<<32) - 1);
1176        do {
1177                hash++;
1178                n += 1LL<<32;
Show full sources