Re: [PATCH 0/5] fuse: handle release synchronously (v4)
From: Miklos Szeredi
Date: Sat Oct 18 2014 - 14:01:18 EST
On Sat, Oct 18, 2014 at 5:40 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, Oct 18, 2014 at 8:35 AM, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> Look around for AIO. Look around for the loop driver. Look around for
>> a number of things that do "fget()" and that you completely ignored.
>
> .. actually, there are more instances of "get_file()" than of
> "fget()", the aio one just happened to be the latter form. Lots and
> lots of ways to get ahold of a file descriptor that keeps it open past
> the "last close".
And what you don't get is that there's a deep difference between those
and the /proc file access case.
And the difference is that one is done because of an explicit action
by the holder of the open file. And the other is done by some random
process doing non-invasive examination of the holder of the open-file.
So basically: we simply don't care if last close does not happen to
release the file *iff* it was because of some explicit action that
obviously has or could have such a side effect. Is that so hard to
understand?
In other words, we care about doing that last release synchronously if
it provably is the last release of that file and happens to be done
from close() (or munmap()). And then all your examples of loop driver
and aio are pointless, because we *know* they will be holding onto
that descriptor, the same as we know, that after dup(), close() will
not release the file and the (non-IDIOTIX) locks together with the
file.
Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/