Merge tag ‘drm-fixes-2019-04-26’ of git://anongit.freedesktop.org/drm/drm [Linux 5.1]

Merge tag ‘drm-fixes-2019-04-26’ of git://anongit.freedesktop.org/drm/drm [Linux 5.1]

This Linux kernel change "Merge tag ‘drm-fixes-2019-04-26’ of git://anongit.freedesktop.org/drm/drm" is included in the Linux 5.1 release. This change is authored by Linus Torvalds <torvalds [at] linux-foundation.org> on Fri Apr 26 10:39:46 2019 -0700. The commit for this change in Linux stable tree is 4e40f0f (patch). Other info about this change: Merge: d0473f9 6db71be

Merge tag 'drm-fixes-2019-04-26' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Regular drm fixes, nothing too outstanding, I'm guessing Easter was
  slowing people down.

  i915:
   - FEC enable fix
   - BXT display lanes fix

  ttm:
   - fix reinit for reloading drivers regression

  imx:
   - DP CSC fix

  sun4i:
   - module unload/load fix

  vc4:
   - memory leak fix
   - compile fix

  dw-hdmi:
   - rockchip scdc overflow fix

  sched:
   - docs fix

  vmwgfx:
   - dma api layering fix"

* tag 'drm-fixes-2019-04-26' of git://anongit.freedesktop.org/drm/drm:
  drm/bridge: dw-hdmi: fix SCDC configuration for ddc-i2c-bus
  drm/vmwgfx: Fix dma API layer violation
  drm/vc4: Fix compilation error reported by kbuild test bot
  drm/sun4i: Unbind components before releasing DRM and memory
  drm/vc4: Fix memory leak during gpu reset.
  drm/sched: Fix description of drm_sched_stop
  drm/imx: don't skip DP channel disable for background plane
  gpu: ipu-v3: dp: fix CSC handling
  drm/ttm: fix re-init of global structures
  drm/sun4i: Fix component unbinding and component master deletion
  drm/sun4i: Set device driver data at bind time for use in unbind
  drm/sun4i: Add missing drm_atomic_helper_shutdown at driver unbind
  drm/i915: Restore correct bxt_ddi_phy_calc_lane_lat_optim_mask() calculation
  drm/i915: Do not enable FEC without DSC
  drm: bridge: dw-hdmi: Fix overflow workaround for Rockchip SoCs

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/btrfs/file-item.c    | 15 +++++++++++----
 fs/btrfs/ordered-data.c |  3 ++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 920bf3b..cccc75d 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -7,6 +7,7 @@
 #include <linux/slab.h>
 #include <linux/pagemap.h>
 #include <linux/highmem.h>
+#include <linux/sched/mm.h>
 #include "ctree.h"
 #include "disk-io.h"
 #include "transaction.h"
@@ -427,9 +428,13 @@ blk_status_t btrfs_csum_one_bio(struct inode *inode, struct bio *bio,
    unsigned long this_sum_bytes = 0;
    int i;
    u64 offset;
+   unsigned nofs_flag;
+
+   nofs_flag = memalloc_nofs_save();
+   sums = kvzalloc(btrfs_ordered_sum_size(fs_info, bio->bi_iter.bi_size),
+              GFP_KERNEL);
+   memalloc_nofs_restore(nofs_flag);

-   sums = kzalloc(btrfs_ordered_sum_size(fs_info, bio->bi_iter.bi_size),
-              GFP_NOFS);
    if (!sums)
        return BLK_STS_RESOURCE;

@@ -472,8 +477,10 @@ blk_status_t btrfs_csum_one_bio(struct inode *inode, struct bio *bio,

                bytes_left = bio->bi_iter.bi_size - total_bytes;

-               sums = kzalloc(btrfs_ordered_sum_size(fs_info, bytes_left),
-                          GFP_NOFS);
+               nofs_flag = memalloc_nofs_save();
+               sums = kvzalloc(btrfs_ordered_sum_size(fs_info,
+                             bytes_left), GFP_KERNEL);
+               memalloc_nofs_restore(nofs_flag);
                BUG_ON(!sums); /* -ENOMEM */
                sums->len = bytes_left;
                ordered = btrfs_lookup_ordered_extent(inode,
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index 6fde2b2..45e3cfd 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -6,6 +6,7 @@
 #include <linux/slab.h>
 #include <linux/blkdev.h>
 #include <linux/writeback.h>
+#include <linux/sched/mm.h>
 #include "ctree.h"
 #include "transaction.h"
 #include "btrfs_inode.h"
@@ -442,7 +443,7 @@ void btrfs_put_ordered_extent(struct btrfs_ordered_extent *entry)
            cur = entry->list.next;
            sum = list_entry(cur, struct btrfs_ordered_sum, list);
            list_del(&sum->list);
-           kfree(sum);
+           kvfree(sum);
        }
        kmem_cache_free(btrfs_ordered_extent_cache, entry);
    }

Leave a Reply

Your email address will not be published. Required fields are marked *