]> granicus.if.org Git - zfs/commitdiff
Fix missing return resulting in a double unlock of &files->file_lock
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Tue, 3 Jun 2008 20:58:55 +0000 (20:58 +0000)
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Tue, 3 Jun 2008 20:58:55 +0000 (20:58 +0000)
and a hang on subsequent sys_close.  I'm not quite sure why the Fedora
kernel caught this bug the Chaos kernel did not, but I'm glad!

Convert remaining BUG_ON's to ASSERTs

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@122 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

modules/splat/splat-atomic.c
modules/splat/splat-vnode.c

index 4de5ef033a1dcbdf45867cb3939283d7ea78dd65..05afdb64b2c820236a45a00d1f45f8418b94736a 100644 (file)
@@ -110,7 +110,7 @@ splat_atomic_work(void *priv)
                                atomic_sub_64_nv(&ap->ap_atomic, 5);
                                break;
                        default:
-                               BUG_ON(1);
+                               SBUG();
                }
        }
 
@@ -153,7 +153,7 @@ splat_atomic_test1(struct file *file, void *arg)
                thr = (kthread_t *)thread_create(NULL, 0, splat_atomic_work,
                                                 &ap, 0, &p0, TS_RUN,
                                                 minclsyspri);
-               BUG_ON(thr == NULL);
+               ASSERT(thr);
 
                /* Prepare to wait, the new thread will wake us once it
                 * has made a copy of the unique private passed data */
index a72dac94b0f5d46458d98311c959130f410e8a42..6f97503880c08243c4a727bdeb3421913a5f9807 100644 (file)
@@ -374,6 +374,7 @@ fd_uninstall(int fd)
          * case I think that's reasonable. */
         spin_unlock(&files->file_lock);
         put_unused_fd(fd);
+        return 0;
 
 out_unlock:
         spin_unlock(&files->file_lock);