From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754843Ab2IOCRO (ORCPT ); Fri, 14 Sep 2012 22:17:14 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:49410 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490Ab2IOCRN (ORCPT ); Fri, 14 Sep 2012 22:17:13 -0400 MIME-Version: 1.0 In-Reply-To: <20120915021104.GS13973@ZenIV.linux.org.uk> References: <20120915015703.GR13973@ZenIV.linux.org.uk> <20120915021104.GS13973@ZenIV.linux.org.uk> Date: Fri, 14 Sep 2012 19:17:12 -0700 Message-ID: Subject: Re: Getting debugfs mountpoint? From: Jacob Sowles To: Al Viro Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The first instance of my code calls debugfs_create_file and stores a pointer to the dentry of that directory. But when the second instance calls debugfs_create_file, the function returns NULL because that directory already exists, so it doesn't return the dentry that I need. On Fri, Sep 14, 2012 at 7:11 PM, Al Viro wrote: > On Fri, Sep 14, 2012 at 07:07:43PM -0700, Jacob Sowles wrote: >> Multiple instances of my code can be run simultaneously, and all >> instances use the same debugfs directory, so I need the path to the >> debugfs root directory so that I can use filp_open to get the dentry >> for that directory. > > What's wrong with just storing a pointer to that dentry in a variable? > And what do you want an opened file (of a directory, at that) on debugfs?