[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Extended Attributes and Access Control Lists



Hi,

On Mon, Oct 29, 2001 at 05:15:02AM +0100, Andreas Gruenbacher wrote:

> How can I properly write a change to a block, and then free it? Does this
> call sequence make sense? (It's not critical when the changes are written
> back; this just poisons the block in case something really strange
> happens.)
> 
>     HDR(old_bh)->h_magic = 0;
>     ext3_journal_dirty_metadata(handle, old_bh);
>     ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1);
>     ext3_forget(handle, 1, inode, old_bh, old_bh->b_blocknr);

You need to have done an

	ext3_journal_get_write_access() 

before modifying the block, but otherwise, fine.

Cheers,
 Stephen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]