Showing error 1025

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: fs/xfs/xfs_filestream.c
Line in file: 316
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

286                item->ag = ag;
287                old_pip = item->pip;
288                item->pip = pip;
289                xfs_mru_cache_done(cache);
290
291                /*
292                 * If the AG has changed, drop the old ref and take a new one,
293                 * effectively transferring the reference from old to new AG.
294                 */
295                if (ag != old_ag) {
296                        xfs_filestream_put_ag(mp, old_ag);
297                        xfs_filestream_get_ag(mp, ag);
298                }
299
300                /*
301                 * If ip is a file and its pip has changed, drop the old ref and
302                 * take a new one.
303                 */
304                if (pip && pip != old_pip) {
305                        IRELE(old_pip);
306                        IHOLD(pip);
307                }
308
309                TRACE_UPDATE(mp, ip, old_ag, xfs_filestream_peek_ag(mp, old_ag),
310                                ag, xfs_filestream_peek_ag(mp, ag));
311                return 0;
312        }
313
314        item = kmem_zone_zalloc(item_zone, KM_MAYFAIL);
315        if (!item)
316                return ENOMEM;
317
318        item->ag = ag;
319        item->ip = ip;
320        item->pip = pip;
321
322        err = xfs_mru_cache_insert(cache, ip->i_ino, item);
323        if (err) {
324                kmem_zone_free(item_zone, item);
325                return err;
326        }
Show full sources