From ffd42ff529f5823b5a04529e1db2ea3b32a9f59f Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Mon, 19 Jan 2015 11:00:13 -0500 Subject: [PATCH] LU-5726 ldiskfs: missed brelse() in large EA patch brelse() is missed in ldiskfs_xattr_delete_inode(), this defect is introduced by the ldiskfs large EA patch. Signed-off-by: Niu Yawei Change-Id: Icfe6015ce9d518b11ec448fe32673ef76ebf4c85 Reviewed-on: http://review.whamcloud.com/13452 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao --- ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch | 7 +++++-- ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch index 955d223..53e0e03 100644 --- a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch +++ b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch @@ -634,7 +634,7 @@ Index: linux-stage/fs/ext4/xattr.c new_offs = le16_to_cpu(last->e_value_offs) + value_offs_shift; BUG_ON(new_offs + le32_to_cpu(last->e_value_size) -@@ -1356,20 +1667,89 @@ cleanup: +@@ -1356,20 +1667,92 @@ cleanup: return error; } @@ -720,10 +720,13 @@ Index: linux-stage/fs/ext4/xattr.c + if (entry->e_value_inum == 0) + continue; + if (ext4_expand_ino_array(lea_ino_array, -+ entry->e_value_inum) != 0) ++ entry->e_value_inum) != 0) { ++ brelse(iloc.bh); + goto cleanup; ++ } + entry->e_value_inum = 0; + } ++ brelse(iloc.bh); +delete_external_ea: if (!EXT4_I(inode)->i_file_acl) diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch index 8b74dca..90a3afd 100644 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch +++ b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch @@ -739,7 +739,7 @@ Index: linux-stage/fs/ext4/xattr.c new_offs = le16_to_cpu(last->e_value_offs) + value_offs_shift; BUG_ON(new_offs + le32_to_cpu(last->e_value_size) -@@ -1359,20 +1673,89 @@ cleanup: +@@ -1359,20 +1673,92 @@ cleanup: return error; } @@ -825,10 +825,13 @@ Index: linux-stage/fs/ext4/xattr.c + if (entry->e_value_inum == 0) + continue; + if (ext4_expand_ino_array(lea_ino_array, -+ entry->e_value_inum) != 0) ++ entry->e_value_inum) != 0) { ++ brelse(iloc.bh); + goto cleanup; ++ } + entry->e_value_inum = 0; + } ++ brelse(iloc.bh); +delete_external_ea: if (!EXT4_I(inode)->i_file_acl) -- 1.8.3.1