Whamcloud - gitweb
b=15777
authorkalpak <kalpak>
Thu, 15 May 2008 14:09:20 +0000 (14:09 +0000)
committerkalpak <kalpak>
Thu, 15 May 2008 14:09:20 +0000 (14:09 +0000)
i=adilger

add patch file

ldiskfs/kernel_patches/patches/ext3-ea-expand-lose-block.patch [new file with mode: 0644]

diff --git a/ldiskfs/kernel_patches/patches/ext3-ea-expand-lose-block.patch b/ldiskfs/kernel_patches/patches/ext3-ea-expand-lose-block.patch
new file mode 100644 (file)
index 0000000..5092bba
--- /dev/null
@@ -0,0 +1,28 @@
+Date: Mon, 12 May 2008 11:24:40 +0800
+From: Tiger Yang <tiger.yang@oracle.com>
+Subject: [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle()
+To: linux-ext4@vger.kernel.org
+Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
+
+This fix the uninitialized bs when we try to replace a xattr entry in ibody
+with the new value which require more than free space.
+
+Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
+
+
+Index: linux-2.6.18-53.1.14/fs/ext3/xattr.c
+===================================================================
+--- linux-2.6.18-53.1.14.orig/fs/ext3/xattr.c
++++ linux-2.6.18-53.1.14/fs/ext3/xattr.c
+@@ -1014,6 +1014,11 @@ ext3_xattr_set_handle(handle_t *handle, 
+                       i.value = NULL;
+                       error = ext3_xattr_block_set(handle, inode, &i, &bs);
+               } else if (error == -ENOSPC) {
++                      if (EXT3_I(inode)->i_file_acl && !bs.s.base) {
++                              error = ext3_xattr_block_find(inode, &i, &bs);
++                              if (error)
++                                      goto cleanup;
++                      }
+                       error = ext3_xattr_block_set(handle, inode, &i, &bs);
+                       if (error)
+                               goto cleanup;