Patch "f2fs: check return value of freeze_super()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    f2fs: check return value of freeze_super()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     f2fs-check-return-value-of-freeze_super.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9b946fdbf7cdb4ff9ee08c7db7927cbc5db65a98
Author: Chao Yu <chao@xxxxxxxxxx>
Date:   Tue Jun 6 14:19:01 2023 +0800

    f2fs: check return value of freeze_super()
    
    [ Upstream commit 8bec7dd1b3f7d7769d433d67bde404de948a2d95 ]
    
    freeze_super() can fail, it needs to check its return value and do
    error handling in f2fs_resize_fs().
    
    Fixes: 04f0b2eaa3b3 ("f2fs: ioctl for removing a range from F2FS")
    Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress")
    Signed-off-by: Chao Yu <chao@xxxxxxxxxx>
    Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 3de887d07c060..aa4d513daa8f8 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -2186,7 +2186,9 @@ int f2fs_resize_fs(struct file *filp, __u64 block_count)
 	if (err)
 		return err;
 
-	freeze_super(sbi->sb);
+	err = freeze_super(sbi->sb);
+	if (err)
+		return err;
 
 	if (f2fs_readonly(sbi->sb)) {
 		thaw_super(sbi->sb);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux