Skip to content

Commit

Permalink
[PATCH] ext3 xattr: Don't write to the in-inode xattr space of reserv…
Browse files Browse the repository at this point in the history
…ed inodes

We are not using the in-inode space for xattrs in reserved inodes because
mkfs.ext3 doesn't initialize it properly.  For those inodes, we set
i_extra_isize to 0.  Make sure that we also don't overwrite the
i_extra_isize field when writing out the inode in that case.  This is for
cleanliness only, and doesn't fix an actual bug.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andreas Gruenbacher authored and Linus Torvalds committed Jul 8, 2005
1 parent 6c03652 commit ff87b37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext3/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,7 @@ static int ext3_do_update_inode(handle_t *handle,
} else for (block = 0; block < EXT3_N_BLOCKS; block++)
raw_inode->i_block[block] = ei->i_data[block];

if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
if (ei->i_extra_isize)
raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);

BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
Expand Down

0 comments on commit ff87b37

Please sign in to comment.