Whamcloud - gitweb
LU-4708 ldiskfs: do not copy NUL terminator from direntry
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / sles11sp2 / ext4-data-in-dirent.patch
index ac76bf9..fa8f7ca 100644 (file)
@@ -54,7 +54,7 @@
        struct fname *fname, *new_fn;
        struct dir_private_info *info;
        int len;
-+      int extra_data = 1;
++      int extra_data = 0;
  
        info = dir_file->private_data;
        p = &info->root.rb_node;
@@ -64,7 +64,7 @@
 +      if (dirent->file_type & EXT4_DIRENT_LUFID)
 +              extra_data = ext4_get_dirent_data_len(dirent);
 +
-+      len = sizeof(struct fname) + dirent->name_len + extra_data;
++      len = sizeof(struct fname) + dirent->name_len + extra_data + 1;
 +
        new_fn = kzalloc(len, GFP_KERNEL);
        if (!new_fn)