Date: Mon, 12 Nov 2007 15:45:24 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Kostik Belousov <kostikbel@gmail.com> Cc: freebsd-current@freebsd.org, delphij@freebsd.org, Dmitry Morozovsky <marck@rinet.ru> Subject: Re: tmpfs on contemporary -current: panic: locked against myself Message-ID: <86k5onwmij.fsf@ds4.des.no> In-Reply-To: <20071112141959.GP37471@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon\, 12 Nov 2007 16\:19\:59 %2B0200") References: <20070917194009.W84177@woozle.rinet.ru> <200709241223.52140.qpadla@gmail.com> <472561A7.60108@delphij.net> <200711121433.26356.qpadla@gmail.com> <20071112141959.GP37471@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Kostik Belousov <kostikbel@gmail.com> writes:
> The following patch fixed it for me.
>
> diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c
> index 4a3cdec..55e9891 100644
> --- a/sys/fs/tmpfs/tmpfs_vfsops.c
> +++ b/sys/fs/tmpfs/tmpfs_vfsops.c
> @@ -201,7 +201,7 @@ tmpfs_mount(struct mount *mp, struct thread *td)
> /* Root node attributes. */
> uid_t root_uid;
> gid_t root_gid;
> - mode_t root_mode;
> + int root_mode;
>=20=20
> struct vattr va;
>=20=20
Alternatively:
@@ -231,7 +231,7 @@
vfs_scanopt(mp->mnt_optnew, "uid", "%d", &root_uid) !=3D 1)
root_uid =3D va.va_uid;
if (mp->mnt_cred->cr_ruid !=3D 0 ||
- vfs_scanopt(mp->mnt_optnew, "mode", "%o", &root_mode) !=3D 1)
+ vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) !=3D 1)
root_mode =3D va.va_mode;
if(vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) !=3D 1)
nodes_max =3D 0;
Incidentally, later edits to the tmpfs code have introduced a number of
style(9) violations, one of which is visible in my patch.
DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86k5onwmij.fsf>
