Patch "f2fs: fix error path handling in truncate_dnode()" 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: fix error path handling in truncate_dnode()

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-fix-error-path-handling-in-truncate_dnode.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 9aadadd22512620a51ae34210180259ed712c18c
Author: Chao Yu <chao@xxxxxxxxxx>
Date:   Thu Jun 29 09:41:02 2023 +0800

    f2fs: fix error path handling in truncate_dnode()
    
    [ Upstream commit 0135c482fa97e2fd8245cb462784112a00ed1211 ]
    
    If truncate_node() fails in truncate_dnode(), it missed to call
    f2fs_put_page(), fix it.
    
    Fixes: 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()")
    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/node.c b/fs/f2fs/node.c
index 07419c3e42a52..a010b4bc36d2c 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -941,8 +941,10 @@ static int truncate_dnode(struct dnode_of_data *dn)
 	dn->ofs_in_node = 0;
 	f2fs_truncate_data_blocks(dn);
 	err = truncate_node(dn);
-	if (err)
+	if (err) {
+		f2fs_put_page(page, 1);
 		return err;
+	}
 
 	return 1;
 }



[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