Messages in this thread |  | | Date | Tue, 11 Sep 2001 15:01:44 -0400 (EDT) | From | Alexander Viro <> | Subject | Re: Freeing inode |
| |
On Fri, 7 Sep 2001, Jan Kara wrote:
> Hello, > > Vladimir pointed me to another bug in ext2 quota allocation. The problem is > that when inode is being created but creation fails (either from user being > over quota or from some other reason) then quota is decremented incorrectly > (previously the usual case when user is over quota was handled by DQUOT_DROP() > but this works no more because of DQUOT_INIT() in iput() and ext2_free_inode()). > I made a patch which marks inode as bad and then quota is not initialized on > bad inodes (which makes sence anyway). The patch which is attached is just preliminary > and nontested (just now I'm realizing that inode being marked as bad might be > dirty which is not probably the best combination). I'd just like to know whether > this approach is ok with you or whether you have some better ideas.
I think I have a better approach - grab quota before everything else in ext2_new_inode() and explicitly release the leftovers in the end. That way we simply do not call ext2_free_inode() - if we got to allocation we are done.
- 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/
|  |