From c2d707967e9ff60b2267ef358f1dab6939d41923 Mon Sep 17 00:00:00 2001 From: Kalpak Shah Date: Wed, 8 Oct 2008 23:21:54 -0400 Subject: [PATCH] --- yaml --- r: 112964 b: refs/heads/master c: 4d20c685fa365766a8f13584b4c8178a15ab7103 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/xattr.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0969f5c9f0db..aae51c9d0004 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 45a90bfd90c1215bf824c0f705b409723f52361b +refs/heads/master: 4d20c685fa365766a8f13584b4c8178a15ab7103 diff --git a/trunk/fs/ext4/xattr.c b/trunk/fs/ext4/xattr.c index 8954208b4893..362b0edd3dbe 100644 --- a/trunk/fs/ext4/xattr.c +++ b/trunk/fs/ext4/xattr.c @@ -959,6 +959,7 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, struct ext4_xattr_block_find bs = { .s = { .not_found = -ENODATA, }, }; + unsigned long no_expand; int error; if (!name) @@ -966,6 +967,9 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, if (strlen(name) > 255) return -ERANGE; down_write(&EXT4_I(inode)->xattr_sem); + no_expand = EXT4_I(inode)->i_state & EXT4_STATE_NO_EXPAND; + EXT4_I(inode)->i_state |= EXT4_STATE_NO_EXPAND; + error = ext4_get_inode_loc(inode, &is.iloc); if (error) goto cleanup; @@ -1042,6 +1046,8 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, cleanup: brelse(is.iloc.bh); brelse(bs.bh); + if (no_expand == 0) + EXT4_I(inode)->i_state &= ~EXT4_STATE_NO_EXPAND; up_write(&EXT4_I(inode)->xattr_sem); return error; }