lkml.org 
[lkml]   [2001]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Freeing inode
  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.
But to allocate a quota I need an inode with proper owner & superblock. If I have
inode I have to put it with iput() if allocation fails -> ext2_free_inode() will be
called unless we play some dirty tricks. Am I missing something?

Honza
--
Jan Kara <jack@suse.cz>
SuSE Labs
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.059 / U:1.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site