Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753501Ab1BEO1A (ORCPT ); Sat, 5 Feb 2011 09:27:00 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:43799 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753291Ab1BEO05 (ORCPT ); Sat, 5 Feb 2011 09:26:57 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=TG/xr1ODTCb1gwFolWAQFBCd+Ud76aSJsKZwLxoJIPg2eyZYDhPZ8UIDbbu+m+r4Sn M+jK/4O3wToWnvwFRc5bNzqrQpcnRlqnYxAKyI0YIcTxFBlu/+QmBDhjcMEwOjboRCMd YjPdlEU5JvxilEw5gy1EuqKdwSJRoEnqgLjYs= Date: Sat, 5 Feb 2011 16:26:48 +0200 From: Alexey Dobriyan To: Lucian Adrian Grijincu Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "Eric W. Biederman" , Eric Dumazet , "David S. Miller" , Octavian Purdila Subject: Re: [PATCH 0/5] net: sysctl: share ipv4/ipv6 sysctl tables Message-ID: <20110205142648.GA9814@p183.telecom.by> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1374 Lines: 37 On Fri, Feb 04, 2011 at 05:59:24PM +0200, Lucian Adrian Grijincu wrote: > On Fri, Feb 4, 2011 at 12:49 PM, Alexey Dobriyan wrote: > >> Finally share the leaf sysctl tables for ipv4/ipv6: > >> > >> ?[PATCH 4/5] ipv4: share sysctl net/ipv4/conf/DEVNAME/ tables > >> ?[PATCH 5/5] ipv6: share sysctl net/ipv6/conf/DEVNAME/ tables > > > > Meh. > > > > First you remove ->parent, then heroically pass "struct file *" > > to sysctl handlers which duplicates all information already passed > > and brings dcache into picture. > > > > Binary sysctl rewrite confused you into thinking that d_name.name > > is the way, but it isn't. > > For binary sysctl(2) you wouldn't get d_name.name. > > > Are you really sure? > > I ran this code on a machine with and without these patches. It seems > to work fine. > > It reads the value from /proc/sys/net/ipv4/conf/default/tag and writes 42 back. > > I'm not sure what I have to do to pass the name of a device (e.g. > "eth0") instead of "default" but at least "default" and "all" work and > have valid dentries. You do ->parent->procname. But, but you removed parent. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/