Re: [patch] 2.5.22 add __fput for aio

Benjamin LaHaise (bcrl@redhat.com)
Mon, 17 Jun 2002 16:19:31 -0400


On Mon, Jun 17, 2002 at 01:11:04PM -0700, Linus Torvalds wrote:
> The other alternative is that aio only does the book-keeping from
> interrupt context, adds the "struct file * to be freed" to some list of
> freeable files, and then does __fput() from _non_interrupt_ context on
> those files.
>
> Is that was aio actually _does_?

Yes -- aio does the atomic_dec_and_test in the interrupt handler, and
if that was the last user of the struct file *, it queues the io handle
for cleanup from task context.

> If so, the code may be fine, but the comments are misleading crap and
> should be fixed asap.

Sure. How's changing it to:

+/* __fput is called from task task when aio completion releases the last
+ * use of a struct file *. Do not use otherwise.
+ */

instead?

-ben

-- 
"You will be reincarnated as a toad; and you will be much happier."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/