X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fext2%2Fxattr.c;h=3e8683dbb13fb0d5cfa12ffbc9bccf560fe63d52;hb=50fd8010673b770f6489c9ee96680c204aefa84a;hp=86ae8e93adb9d84dadbace346c65f0c5b09952fa;hpb=fab8d6ddf6dee2608869005d45fe97f70e4f5bdd;p=linux-2.6-omap-h63xx.git diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 86ae8e93adb..3e8683dbb13 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -342,12 +342,9 @@ static void ext2_xattr_update_super_block(struct super_block *sb) if (EXT2_HAS_COMPAT_FEATURE(sb, EXT2_FEATURE_COMPAT_EXT_ATTR)) return; - lock_super(sb); - EXT2_SB(sb)->s_es->s_feature_compat |= - cpu_to_le32(EXT2_FEATURE_COMPAT_EXT_ATTR); + EXT2_SET_COMPAT_FEATURE(sb, EXT2_FEATURE_COMPAT_EXT_ATTR); sb->s_dirt = 1; mark_buffer_dirty(EXT2_SB(sb)->s_sbh); - unlock_super(sb); } /* @@ -521,11 +518,10 @@ bad_block: ext2_error(sb, "ext2_xattr_set", } } else { /* Allocate a buffer where we construct the new block. */ - header = kmalloc(sb->s_blocksize, GFP_KERNEL); + header = kzalloc(sb->s_blocksize, GFP_KERNEL); error = -ENOMEM; if (header == NULL) goto cleanup; - memset(header, 0, sb->s_blocksize); end = (char *)header + sb->s_blocksize; header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC); header->h_blocks = header->h_refcount = cpu_to_le32(1); @@ -668,8 +664,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, s_first_data_block) + EXT2_I(inode)->i_block_group * EXT2_BLOCKS_PER_GROUP(sb); - int block = ext2_new_block(inode, goal, - NULL, NULL, &error); + int block = ext2_new_block(inode, goal, &error); if (error) goto cleanup; ea_idebug(inode, "creating block %d", block);