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 3e1b56a..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) {
@@ -1516,7 +1516,7 @@ Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/namei.c
        unsigned count, indirect;
 -      struct dx_entry *at, *entries, *p, *q, *m;
 +      struct dx_entry *at, *entries, *p, *q, *m, *dx = NULL;
-       struct dx_root_info * info;
+       struct dx_root_info *info;
        struct buffer_head *bh;
        struct dx_frame *frame = frame_in;
 @@ -750,8 +980,15 @@ dx_probe(const struct qstr *d_name, stru
@@ -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);