Date: Fri, 2 Apr 2010 11:20:10 GMT From: Eugene Grosbein <egrosbein@rdtc.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/107439: 6.2-PRE repeatable panic: userret: Returning with 1 locks held Message-ID: <201004021120.o32BKAFo070624@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/107439; it has been noted by GNATS. From: Eugene Grosbein <egrosbein@rdtc.ru> To: Mikolaj Golub <to.my.trociny@gmail.com> Cc: bug-followup@FreeBSD.org, Kostik Belousov <kostikbel@gmail.com> Subject: Re: kern/107439: 6.2-PRE repeatable panic: userret: Returning with 1 locks held Date: Fri, 02 Apr 2010 18:16:49 +0700 Mikolaj Golub wrote: > I have tested the patch and it works for me. I've also found and tested another patch sent to freebsd-fs@ by Kostik Belousov. It works for me too. I'll run it for some time. Of course, I do not apply both patches same time. I'm copying it here for completeness. --- sys/kern/vfs_default.c.orig +++ sys/kern/vfs_default.c @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vnode_pager.h> static int vop_nolookup(struct vop_lookup_args *); +static int vop_norename(struct vop_rename_args *); static int vop_nostrategy(struct vop_strategy_args *); static int get_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, int dirbuflen, off_t *off, @@ -113,6 +114,7 @@ struct vop_vector default_vnodeops = { .vop_poll = vop_nopoll, .vop_putpages = vop_stdputpages, .vop_readlink = VOP_EINVAL, + .vop_rename = vop_norename, .vop_revoke = VOP_PANIC, .vop_strategy = vop_nostrategy, .vop_unlock = vop_stdunlock, @@ -206,6 +208,27 @@ vop_nolookup(ap) } /* + * vop_norename: + * + * Handle unlock and reference counting for arguments of vop_rename + * for filesystems that do not implement rename operation. + */ +static int +vop_norename(struct vop_rename_args *ap) +{ + + if (ap->a_tvp != NULL) + vput(ap->a_tvp); + if (ap->a_tdvp == ap->a_tvp) + vrele(ap->a_tdvp); + else + vput(ap->a_tdvp); + vrele(ap->a_fdvp); + vrele(ap->a_fvp); + return (EOPNOTSUPP); +} + +/* * vop_nostrategy: * * Strategy routine for VFS devices that have none. Eugene Grosbein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004021120.o32BKAFo070624>