Showing error 1031

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


Source:

414
415                /*
416                 * We can safely drop inode_lock here because we hold
417                 * references on both inode and next_i.  Also no new inodes
418                 * will be added since the umount has begun.  Finally,
419                 * iprune_mutex keeps shrink_icache_memory() away.
420                 */
421                spin_unlock(&inode_lock);
422
423                if (need_iput_tmp)
424                        iput(need_iput_tmp);
425
426                /* for each watch, send IN_UNMOUNT and then remove it */
427                mutex_lock(&inode->inotify_mutex);
428                watches = &inode->inotify_watches;
429                list_for_each_entry_safe(watch, next_w, watches, i_list) {
430                        struct inotify_handle *ih= watch->ih;
431                        get_inotify_watch(watch);
432                        mutex_lock(&ih->mutex);
433                        ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0,
434                                                 NULL, NULL);
435                        inotify_remove_watch_locked(ih, watch);
436                        mutex_unlock(&ih->mutex);
437                        put_inotify_watch(watch);
438                }
439                mutex_unlock(&inode->inotify_mutex);
440                iput(inode);                
441
442                spin_lock(&inode_lock);
443        }
444}
445EXPORT_SYMBOL_GPL(inotify_unmount_inodes);
446
447/**
448 * inotify_inode_is_dead - an inode has been deleted, cleanup any watches
449 * @inode: inode that is about to be removed
450 */
451void inotify_inode_is_dead(struct inode *inode)
452{
453        struct inotify_watch *watch, *next;
454
Show full sources