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
Subject: Re: 2.4 Q: list of open files per inode?
Date: Thu, 19 Jul 2007 17:38:10 +0100 [thread overview]
Message-ID: <20070719163810.GV21668@ftp.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0707191339090.30033@fbirervta.pbzchgretzou.qr>
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...
next prev parent reply other threads:[~2007-07-19 16:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 9:01 2.4 Q: list of open files per inode? Jacob A
2007-07-19 11:41 ` Jan Engelhardt
2007-07-19 16:38 ` Al Viro [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-22 11:39 Jacob A
2007-07-22 11:58 ` Jan Engelhardt
2007-07-22 12:51 ` Al Viro
2007-07-22 12:26 Jacob A
2007-07-22 12:28 ` Jan Engelhardt
2007-07-22 12:45 Jacob A
2007-07-22 13:07 ` Jan Engelhardt
2007-07-22 14:35 ` 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=20070719163810.GV21668@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=jacoba51-tmp@yahoo.com \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
/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