mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacob A <jacoba51-tmp@yahoo.com>
To: Al Viro <viro@ftp.linux.org.uk>,
	Jan Engelhardt <jengelh@computergmbh.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4 Q: list of open files per inode?
Date: Sun, 22 Jul 2007 04:39:14 -0700 (PDT)	[thread overview]
Message-ID: <259547.37103.qm@web57705.mail.re3.yahoo.com> (raw)

Al,

I'm using the open/close call as a way for processes to register/unregister with a watchdog driver that I'm writing.
I thought that I can save the housekeeping within the driver, but it looks like It would be easier just to maintain my own list
and be done with it.

Jacob

----- Original Message ----
From: Al Viro <viro@ftp.linux.org.uk>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Jacob A <jacoba51-tmp@yahoo.com>; linux-kernel@vger.kernel.org
Sent: Thursday, July 19, 2007 7:38:10 PM
Subject: Re: 2.4 Q: list of open files per inode?

On Thu, Jul 19, 2007 at 01:41:03PM +0200, Jan Engelhardt wrote:
> 
> On Jul 19 2007 02:01, Jacob A wrote:
> >
> > How can a device driver go over the  list of all the files that are open on a
> > specific inode instance?
> 
> pseudo-code:
> 
> task_list_lock;
> for each process; do
>     lock_fdtable;
>     for each filedescriptor; do
>         do_something(fd->file_ptr);
>     unlock_fdtable;
> task_list_unlock;

Not again...

There are other things that can keep file open.  SCM_RIGHTS, references
held by syscall in progress, etc., etc.

The real question is why does driver want to do that?  Details, please...




             reply	other threads:[~2007-07-22 11:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 11:39 Jacob A [this message]
2007-07-22 11:58 ` Jan Engelhardt
2007-07-22 12:51 ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2007-07-22 12:45 Jacob A
2007-07-22 13:07 ` Jan Engelhardt
2007-07-22 14:35   ` Al Viro
2007-07-22 12:26 Jacob A
2007-07-22 12:28 ` Jan Engelhardt
2007-07-19  9:01 Jacob A
2007-07-19 11:41 ` Jan Engelhardt
2007-07-19 16:38   ` Al Viro

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=259547.37103.qm@web57705.mail.re3.yahoo.com \
    --to=jacoba51-tmp@yahoo.com \
    --cc=jengelh@computergmbh.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.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

Powered by JetHome