linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Sowles <sowlesj@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Getting debugfs mountpoint?
Date: Fri, 14 Sep 2012 19:17:12 -0700	[thread overview]
Message-ID: <CA+cF-pt5_SENuizLXjQOSC4gJ8hMOnc9SamALLU77RWvwFa-sQ@mail.gmail.com> (raw)
In-Reply-To: <20120915021104.GS13973@ZenIV.linux.org.uk>

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 <viro@zeniv.linux.org.uk> 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?

  reply	other threads:[~2012-09-15  2:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-15  1:49 Getting debugfs mountpoint? Jacob Sowles
2012-09-15  1:57 ` Al Viro
2012-09-15  2:07   ` Jacob Sowles
2012-09-15  2:11     ` Al Viro
2012-09-15  2:17       ` Jacob Sowles [this message]
2012-09-15  2:19         ` Jacob Sowles
2012-09-15  2:27         ` Al Viro
2012-09-16 20:23 ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+cF-pt5_SENuizLXjQOSC4gJ8hMOnc9SamALLU77RWvwFa-sQ@mail.gmail.com \
    --to=sowlesj@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).