Patch "f2fs: fix error path handling in truncate_dnode()" has been added to the 5.4-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 5.4-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-5.4 subdirectory.

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



commit a0996a6d79039d5b6f0692dd35faa2cef61e28c6
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 b080d5c58f6cb..8256a2dedae8c 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -889,8 +889,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