Patch "xfs: fix inode reservation space for removing transaction" has been added to the 5.15-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

    xfs: fix inode reservation space for removing transaction

to the 5.15-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:
     xfs-fix-inode-reservation-space-for-removing-transac.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 731e97e945f43f9b12467685ac0b5894781c5ed3
Author: hexiaole <hexiaole@xxxxxxxxxx>
Date:   Wed Nov 15 18:28:29 2023 -0800

    xfs: fix inode reservation space for removing transaction
    
    [ Upstream commit 031d166f968efba6e4f091ff75d0bb5206bb3918 ]
    
    In 'fs/xfs/libxfs/xfs_trans_resv.c', the comment for transaction of removing a
    directory entry writes:
    
    /* fs/xfs/libxfs/xfs_trans_resv.c begin */
    /*
     * For removing a directory entry we can modify:
     *    the parent directory inode: inode size
     *    the removed inode: inode size
    ...
    xfs_calc_remove_reservation(
            struct xfs_mount        *mp)
    {
            return XFS_DQUOT_LOGRES(mp) +
                    xfs_calc_iunlink_add_reservation(mp) +
                    max((xfs_calc_inode_res(mp, 1) +
    ...
    /* fs/xfs/libxfs/xfs_trans_resv.c end */
    
    There has 2 inode size of space to be reserverd, but the actual code
    for inode reservation space writes.
    
    There only count for 1 inode size to be reserved in
    'xfs_calc_inode_res(mp, 1)', rather than 2.
    
    Signed-off-by: hexiaole <hexiaole@xxxxxxxxxx>
    Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>
    [djwong: remove redundant code citations]
    Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
    Signed-off-by: Leah Rumancik <leah.rumancik@xxxxxxxxx>
    Acked-by: Chandan Babu R <chandanbabu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
index 5e300daa25593..2db9d9d123444 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.c
+++ b/fs/xfs/libxfs/xfs_trans_resv.c
@@ -423,7 +423,7 @@ xfs_calc_remove_reservation(
 {
 	return XFS_DQUOT_LOGRES(mp) +
 		xfs_calc_iunlink_add_reservation(mp) +
-		max((xfs_calc_inode_res(mp, 1) +
+		max((xfs_calc_inode_res(mp, 2) +
 		     xfs_calc_buf_res(XFS_DIROP_LOG_COUNT(mp),
 				      XFS_FSB_TO_B(mp, 1))),
 		    (xfs_calc_buf_res(4, mp->m_sb.sb_sectsize) +



[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