[lkml]   [2001]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 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
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:03    [W:0.021 / U:118.508 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site