Peter,

On Sun, 29 Oct 2000, Peter J. Braam wrote:

> I have a little patch for you - in ialloc, you have
> 
> #ifdef CONFIG_EXT2_FS_EXT_ATTR
>       if (inode->u.ext2_i.i_file_acl)
>               ext2_ext_attr_free_inode(inode);
> #endif
> 
> You probably want:
> 
> + #ifdef CONFIG_EXT2_FS_EXT_ATTR
> +     if (inode->u.ext2_i.i_file_acl) {
> +             ext2_free_blocks(inode, inode->u.ext2_i.i_file_acl, 1);
> +             inode->u.ext2_i.i_file_acl = 0;
> +             inode->i_blocks -= (inode->i_sb->s_blocksize >> 9);
> +     }
> + #endif

The ext2_ext_attr_free_inode() function does roughly what you're
suggesting for the case that an EA block's reference count reaches 0. It
also marks the EA block as invalid (by overwriting the magic value) and
cleans up the cache. The case that the reference count doesn't reach 0 is
also handled.

Am I missing something?


Thanks,
Andreas.

------------------------------------------------------------------------
 Andreas Gruenbacher, [EMAIL PROTECTED]
 Contact information: http://www.bestbits.at/~ag/

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to