Whamcloud - gitweb
LU-5726 ldiskfs: missed brelse() in large EA patch 52/13452/3
authorNiu Yawei <yawei.niu@intel.com>
Mon, 19 Jan 2015 16:00:13 +0000 (11:00 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 22 Jan 2015 17:53:21 +0000 (17:53 +0000)
brelse() is missed in ldiskfs_xattr_delete_inode(), this
defect is introduced by the ldiskfs large EA patch.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Icfe6015ce9d518b11ec448fe32673ef76ebf4c85
Reviewed-on: http://review.whamcloud.com/13452
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch
ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch

index 955d223..53e0e03 100644 (file)
@@ -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)
index 8b74dca..90a3afd 100644 (file)
@@ -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)