Showing error 1332

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/namespace.c
Line in file: 283
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 253{
 254        int ret = 0;
 255        struct mnt_writer *cpu_writer;
 256
 257        cpu_writer = &get_cpu_var(mnt_writers);
 258        spin_lock(&cpu_writer->lock);
 259        if (__mnt_is_readonly(mnt)) {
 260                ret = -EROFS;
 261                goto out;
 262        }
 263        use_cpu_writer_for_mount(cpu_writer, mnt);
 264        cpu_writer->count++;
 265out:
 266        spin_unlock(&cpu_writer->lock);
 267        put_cpu_var(mnt_writers);
 268        return ret;
 269}
 270EXPORT_SYMBOL_GPL(mnt_want_write);
 271
 272static void lock_mnt_writers(void)
 273{
 274        int cpu;
 275        struct mnt_writer *cpu_writer;
 276
 277        for_each_possible_cpu(cpu) {
 278                cpu_writer = &per_cpu(mnt_writers, cpu);
 279                spin_lock(&cpu_writer->lock);
 280                __clear_mnt_count(cpu_writer);
 281                cpu_writer->mnt = NULL;
 282        }
 283}
 284
 285/*
 286 * These per-cpu write counts are not guaranteed to have
 287 * matched increments and decrements on any given cpu.
 288 * A file open()ed for write on one cpu and close()d on
 289 * another cpu will imbalance this count.  Make sure it
 290 * does not get too far out of whack.
 291 */
 292static void handle_write_count_underflow(struct vfsmount *mnt)
 293{
Show full sources