Fix issue1314 - panic when exporting -public flag
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 25 Aug 2009 22:34:05 +0000 (15:34 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 25 Aug 2009 22:34:05 +0000 (15:34 -0700)
* Double exclusive vnode lock was to blame.

Reported-by: Michael Neumann <mneumann@crater.dragonflybsd.org>
Testing-also-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
sys/kern/vfs_syscalls.c

index ff6ed66..2146fb8 100644 (file)
@@ -998,17 +998,18 @@ kern_mountctl(const char *path, int op, struct file *fp,
        nlookup_done(&nd);
        if (error)
                return (error);
+       vn_unlock(vp);
 
        /*
         * Must be the root of the filesystem
         */
        if ((vp->v_flag & (VROOT|VPFSROOT)) == 0) {
-               vput(vp);
+               vrele(vp);
                return (EINVAL);
        }
        error = vop_mountctl(mp->mnt_vn_use_ops, op, fp, ctl, ctllen, 
                                buf, buflen, res);
-       vput(vp);
+       vrele(vp);
        return (error);
 }