Whamcloud - gitweb
LU-6722 ldiskfs: fix credits at ldiskfs_delete_inode
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / sles12 / ext4-large-eas.patch
index 6c94182..2820da2 100644 (file)
@@ -114,6 +114,20 @@ Index: linux-stage/fs/ext4/inode.c
        inode->i_size = 0;
        err = ext4_mark_inode_dirty(handle, inode);
        if (err) {
+@@ -269,10 +296,10 @@ void ext4_evict_inode(struct inode *inod
+        * enough credits left in the handle to remove the inode from
+        * the orphan list and set the dtime field.
+        */
+-      if (!ext4_handle_has_enough_credits(handle, 3)) {
+-              err = ext4_journal_extend(handle, 3);
++      if (!ext4_handle_has_enough_credits(handle, extra_credits)) {
++              err = ext4_journal_extend(handle, extra_credits);
+               if (err > 0)
+-                      err = ext4_journal_restart(handle, 3);
++                      err = ext4_journal_restart(handle, extra_credits);
+               if (err != 0) {
+                       ext4_warning(inode->i_sb,
+                                    "couldn't extend journal (err %d)", err);
 @@ -307,6 +334,9 @@ void ext4_evict_inode(struct inode *inod
                ext4_free_inode(handle, inode);
        ext4_journal_stop(handle);
@@ -137,6 +151,14 @@ Index: linux-stage/fs/ext4/xattr.c
 ===================================================================
 --- linux-stage.orig/fs/ext4/xattr.c
 +++ linux-stage/fs/ext4/xattr.c
+@@ -201,6 +201,7 @@ ext4_xattr_check_names(struct ext4_xattr
+       while (!IS_LAST_ENTRY(entry)) {
+               if (entry->e_value_size != 0 &&
++                  entry->e_value_inum == 0 &&
+                   (value_start + le16_to_cpu(entry->e_value_offs) <
+                    (void *)e + sizeof(__u32) ||
+                    value_start + le16_to_cpu(entry->e_value_offs) +
 @@ -233,19 +233,26 @@ ext4_xattr_check_block(struct inode *ino
  }