Whamcloud - gitweb
LU-13291 ldiskfs: mballoc don't skip uninit-on-disk groups
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7 / ext4-pdirop.patch
index a59671a..f512009 100644 (file)
@@ -1490,7 +1490,7 @@ Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/namei.c
 +                                 struct dx_entry *entries,
 +                                 struct dx_entry *at, u32 hash)
 +{
-+      if (!(ext4_htree_lock_data(lck)->ld_flags & EXT4_LB_EXACT)) {
++      if (!(lck && ext4_htree_lock_data(lck)->ld_flags & EXT4_LB_EXACT)) {
 +              return DX_HASH_COL_IGNORE; /* don't care about collision */
 +
 +      } else if (at == entries + dx_get_count(entries) - 1) {
@@ -1875,7 +1875,7 @@ Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/namei.c
                            dx_get_limit((frame - 1)->entries)) {
 @@ -2277,16 +2622,43 @@ again:
                        restart = 1;
-                       goto cleanup;
+                       goto journal_error;
                }
 +      } else if (!ext4_htree_dx_locked(lck)) {
 +              struct ext4_dir_lock_data *ld = ext4_htree_lock_data(lck);
@@ -1911,7 +1911,7 @@ Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/namei.c
        goto cleanup;
  
  journal_error:
-       ext4_std_error(dir->i_sb, err);
+       ext4_std_error(dir->i_sb, err); /* this is a no-op if err == 0 */
  cleanup:
 +      ext4_htree_dx_unlock(lck);
 +      ext4_htree_de_unlock(lck);