Re: [PATCH] firewire: fail open() quickly if the node doesn't exist anymore

From: Jarod Wilson
Date: Mon Jan 28 2008 - 17:32:38 EST


On Sunday 27 January 2008 12:21:56 pm Stefan Richter wrote:
> Scenario: Process A keeps the character device file of node N open.
> N is being unplugged. File /dev/fwN won't be destroyed as long as A
> doesn't close it. Now, process B opens /dev/fwN as well. Previously
> it would succeed but be unable to do any IO on it of course. With this
> patch, process B's open() will fail immediately with -ENODEV.
>
> Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>

Makes perfect sense to me, no problems with it in cursory testing.

Signed-off-by: Jarod Wilson <jwilson@xxxxxxxxxx>

--
Jarod Wilson
jwilson@xxxxxxxxxx
--
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/