]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up queue-5.10/f2fs-fix-to-avoid-null-pointer-dereference-f2fs_write_end_io.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jul 2023 19:05:11 +0000 (21:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jul 2023 19:05:11 +0000 (21:05 +0200)
queue-5.10/f2fs-fix-to-avoid-null-pointer-dereference-f2fs_write_end_io.patch

index d481a521d837d89b0e3b8880ccb8b50775e08618..65a73ce58fe12e552611fc46477b0eb35031730d 100644 (file)
@@ -73,8 +73,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
  fs/f2fs/f2fs.h |    2 +-
  fs/f2fs/file.c |    2 +-
- fs/f2fs/gc.c   |   2++++++++++++++++++---
- 3 files changed, 20 insertions(+), 5 deletions(-)
+ fs/f2fs/gc.c   |   22 +++++++++++++++++++---
+ 3 files changed, 21 insertions(+), 5 deletions(-)
 
 --- a/fs/f2fs/f2fs.h
 +++ b/fs/f2fs/f2fs.h
@@ -100,7 +100,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  static int f2fs_ioc_enable_verity(struct file *filp, unsigned long arg)
 --- a/fs/f2fs/gc.c
 +++ b/fs/f2fs/gc.c
-@@ -1976,8 +1976,9 @@ static void update_fs_metadata(struct f2
+@@ -7,6 +7,7 @@
+  */
+ #include <linux/fs.h>
+ #include <linux/module.h>
++#include <linux/mount.h>
+ #include <linux/backing-dev.h>
+ #include <linux/init.h>
+ #include <linux/f2fs_fs.h>
+@@ -1976,8 +1977,9 @@ static void update_fs_metadata(struct f2
        }
  }
  
@@ -111,7 +119,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        __u64 old_block_count, shrunk_blocks;
        struct cp_control cpc = { CP_RESIZE, 0, 0, 0 };
        unsigned int secs;
-@@ -2015,12 +2016,18 @@ int f2fs_resize_fs(struct f2fs_sb_info *
+@@ -2015,12 +2017,18 @@ int f2fs_resize_fs(struct f2fs_sb_info *
                return -EINVAL;
        }
  
@@ -132,7 +140,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  
        /* stop CP to protect MAIN_SEC in free_segment_range */
        f2fs_lock_op(sbi);
-@@ -2040,10 +2047,18 @@ int f2fs_resize_fs(struct f2fs_sb_info *
+@@ -2040,10 +2048,18 @@ int f2fs_resize_fs(struct f2fs_sb_info *
  out_unlock:
        f2fs_unlock_op(sbi);
        up_write(&sbi->gc_lock);