From owner-freebsd-current@FreeBSD.ORG Mon Nov 12 19:11:43 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CBAE16A41A; Mon, 12 Nov 2007 19:11:43 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id 7410613C4B0; Mon, 12 Nov 2007 19:11:42 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id EA671EBB842; Tue, 13 Nov 2007 03:03:03 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id 6qIns5L2xotP; Tue, 13 Nov 2007 03:02:59 +0800 (CST) Received: from charlie.delphij.net (71.5.7.139.ptr.us.xo.net [71.5.7.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 64EA8EB1E47; Tue, 13 Nov 2007 03:02:57 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:content-type:content-transfer-encoding; b=FMJcqyD7i5SwbVFGsZFWfRxeN84e6ul23Ktd//Wk+j7B+WhNrVhPjn1vfUf3gmjIs uxl6DsHgDxp1kw9zx+A6g== Message-ID: <4738A35D.3080408@delphij.net> Date: Mon, 12 Nov 2007 11:02:53 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.6 (X11/20071031) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= 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> <86k5onwmij.fsf@ds4.des.no> In-Reply-To: <86k5onwmij.fsf@ds4.des.no> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Kostik Belousov , freebsd-current@freebsd.org, delphij@freebsd.org, Dmitry Morozovsky Subject: Re: tmpfs on contemporary -current: panic: locked against myself X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2007 19:11:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dag-Erling Smørgrav wrote: > Kostik Belousov 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; >> >> struct vattr va; >> > > Alternatively: > > @@ -231,7 +231,7 @@ > vfs_scanopt(mp->mnt_optnew, "uid", "%d", &root_uid) != 1) > root_uid = va.va_uid; > if (mp->mnt_cred->cr_ruid != 0 || > - vfs_scanopt(mp->mnt_optnew, "mode", "%o", &root_mode) != 1) > + vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) > root_mode = va.va_mode; > if(vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) > nodes_max = 0; Oh... My fault, thanks for pointing out. I have just checked it into - -HEAD. > Incidentally, later edits to the tmpfs code have introduced a number of > style(9) violations, one of which is visible in my patch. Could you please give me a copy of the patch? :) Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHOKNdhcUczkLqiksRAhZ5AJ9MKCYlDT+NGGESAHf2BE0mSm5FeACgqHO3 Nk6Lk2Bt8L3z78oza08d9Xw= =TfYA -----END PGP SIGNATURE-----