Messages in this thread |  | | Date | Tue, 5 Dec 2000 23:15:04 +0000 | From | "Stephen C. Tweedie" <> | Subject | Re: test12-pre5 |
| |
Hi,
On Tue, Dec 05, 2000 at 03:17:07PM -0500, Alexander Viro wrote: > > > On Tue, 5 Dec 2000, Linus Torvalds wrote: > > > And this is not just a "it happens to be like this" kind of thing. It > > _has_ to be like this, because every time we call clear_inode() we are > > going to physically free the memory associated with the inode very soon > > afterwards. Which means that _any_ use of the inode had better be long > > gone. Dirty buffers included. > > Urgh. Linus, AFAICS we _all_ agree on that. The only real question is > whether we consider calling clear_inode() with droppable dirty buffers > to be OK. It can't happen on the dispose_list() path and I'ld rather > see it _not_ happening on the delete_inode() one. It's a policy question, > not the correctness one.
Right, because if we get this wrong, the kernel won't complain, but we'll have a rare, impossible-to-diagnose potential data corrupter for any applications which do recovery on reboot.
If we're not going to change the code, then at the very least a huge warning comment above clear_inode() is necessary to make it explicit that you shouldn't ever pass in an inode with dirty buffers unless nlink==0, and I'd rather see the BUG there instead.
--Stephen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |