Messages in this thread | | | Date | Tue, 12 Aug 97 16:13:09 MDT | From | (Colin Plumb) | Subject | Re: patch for fs/dcache race |
| |
> I thought of that, but it's not an issue. You can't delete a directory > unless it's empty.
So the file, and some number of parent directories, are going to be deleted. Do you care to know about the deletion status of the parents?
> /foo//bar//baz
This suggestion would also work.
> HOWEVER, in the end I decided that this doesn't make any difference. The > "(deleted)" at the end is more human-readable, and as the name is really > only for readability anyway. If you want to do machine-readability, it's a > lot easier to do a "stat()" on the file and look at the i_nlink value > (zero means it's deleted).
Mightn't there be other hard links to the file? The name it was opened by (say, /usr/bin/ex) might have been deleted, but /usr/bin/vi and /usr/bin/view might still work.
(H'm... as soon as I reboot, I'll have to try "ln /proc/self/fd/0 /tmp/foo < /tmp/bar", and the equivalent with a deleted file.) -- -Colin
| |