linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: David Chinner <dgc@sgi.com>
Cc: Christoph Hellwig <hch@lst.de>,
	akpm@osdl.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] coda: kill file_count abuse
Date: Fri, 20 Jul 2007 04:16:31 +0100	[thread overview]
Message-ID: <20070720031631.GC21668@ftp.linux.org.uk> (raw)
In-Reply-To: <20070720023601.GC31489@sgi.com>

On Fri, Jul 20, 2007 at 12:36:01PM +1000, David Chinner wrote:
> To the context that dropped the last reference. It can't be
> reported to anything else....

Oh, for fsck sake...

Send a datagram with SCM_RIGHTS in it.  Have all other references
to these files closed.  Now have close(2) kill the socket that
might eventually be used to receive the datagram.  Now, all these
files are closed.  Tell me, which error value would you report
to that caller of close() and how would it guess which files had
those been?

Consider munmap().  It can release the last reference to any number
of files (mmap them in different places, then munmap the entire
area).  Which error would you report?

Consider exit(), for crying out loud.  You have a file opened.
You fork a child.  You close the file in parent.  Child goes
away.  Who do you report that stuff?

  reply	other threads:[~2007-07-20  3:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 21:45 [PATCH] coda: kill file_count abuse Christoph Hellwig
2007-07-19 22:16 ` Jan Harkes
2007-07-20  0:45   ` David Chinner
2007-07-20  0:53     ` Al Viro
2007-07-20  2:36       ` David Chinner
2007-07-20  3:16         ` Al Viro [this message]
2007-07-20  4:10           ` [PATCH] coda: file count cannot be used to discover last close Jan Harkes
2007-07-20  5:38             ` Al Viro
2007-07-20 14:26               ` Jan Harkes
2007-07-20  6:03           ` [PATCH] coda: kill file_count abuse David Chinner
2007-07-20  2:40       ` Jan Harkes

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=20070720031631.GC21668@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=dgc@sgi.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).