Patch "ext4: check the return value of ext4_xattr_inode_dec_ref()" 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

    ext4: check the return value of ext4_xattr_inode_dec_ref()

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:
     ext4-check-the-return-value-of-ext4_xattr_inode_dec_.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 21a645b83ae2cc3615d4ef0fa53bb0de1f407d4f
Author: Li Zhong <floridsleeves@xxxxxxxxx>
Date:   Fri Sep 16 17:28:16 2022 -0700

    ext4: check the return value of ext4_xattr_inode_dec_ref()
    
    [ Upstream commit 56d0d0b9289dae041becc7ee6bd966a00dd610e0 ]
    
    Check the return value of ext4_xattr_inode_dec_ref(), which could
    return error code and need to be warned.
    
    Signed-off-by: Li Zhong <floridsleeves@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20220917002816.3804400-1-floridsleeves@xxxxxxxxx
    Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
    Stable-dep-of: 0a46ef234756 ("ext4: do not create EA inode under buffer lock")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index f0a45d3ec4ebb..0df0a3ecba37a 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1550,7 +1550,8 @@ static int ext4_xattr_inode_lookup_create(handle_t *handle, struct inode *inode,
 
 	err = ext4_xattr_inode_write(handle, ea_inode, value, value_len);
 	if (err) {
-		ext4_xattr_inode_dec_ref(handle, ea_inode);
+		if (ext4_xattr_inode_dec_ref(handle, ea_inode))
+			ext4_warning_inode(ea_inode, "cleanup dec ref error %d", err);
 		iput(ea_inode);
 		return err;
 	}




[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