Patch "ocfs2: mark dquot as inactive if failed to start trans while releasing dquot" 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

    ocfs2: mark dquot as inactive if failed to start trans while releasing dquot

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:
     ocfs2-mark-dquot-as-inactive-if-failed-to-start-tran.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 7c4ec9de234e6c68da39d612eb015fe5b02aa486
Author: Su Yue <glass.su@xxxxxxxx>
Date:   Mon Jan 6 22:06:53 2025 +0800

    ocfs2: mark dquot as inactive if failed to start trans while releasing dquot
    
    [ Upstream commit 276c61385f6bc3223a5ecd307cf4aba2dfbb9a31 ]
    
    While running fstests generic/329, the kernel workqueue
    quota_release_workfn is dead looping in calling ocfs2_release_dquot().
    The ocfs2 state is already readonly but ocfs2_release_dquot wants to
    start a transaction but fails and returns.
    
    =====================================================================
    [ 2918.123602 ][  T275 ] On-disk corruption discovered. Please run
    fsck.ocfs2 once the filesystem is unmounted.
    [ 2918.124034 ][  T275 ] (kworker/u135:1,275,11):ocfs2_release_dquot:765
    ERROR: status = -30
    [ 2918.124452 ][  T275 ] (kworker/u135:1,275,11):ocfs2_release_dquot:795
    ERROR: status = -30
    [ 2918.124883 ][  T275 ] (kworker/u135:1,275,11):ocfs2_start_trans:357
    ERROR: status = -30
    [ 2918.125276 ][  T275 ] OCFS2: abort (device dm-0): ocfs2_start_trans:
    Detected aborted journal
    [ 2918.125710 ][  T275 ] On-disk corruption discovered. Please run
    fsck.ocfs2 once the filesystem is unmounted.
    =====================================================================
    
    ocfs2_release_dquot() is much like dquot_release(), which is called by
    ext4 to handle similar situation.  So here fix it by marking the dquot as
    inactive like what dquot_release() does.
    
    Link: https://lkml.kernel.org/r/20250106140653.92292-1-glass.su@xxxxxxxx
    Fixes: 9e33d69f553a ("ocfs2: Implementation of local and global quota file handling")
    Signed-off-by: Su Yue <glass.su@xxxxxxxx>
    Reviewed-by: Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx>
    Cc: Mark Fasheh <mark@xxxxxxxxxx>
    Cc: Joel Becker <jlbec@xxxxxxxxxxxx>
    Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
    Cc: Changwei Ge <gechangwei@xxxxxxx>
    Cc: Jun Piao <piaojun@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index cc464c9560e25..79e70aaa9a90d 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -749,6 +749,11 @@ static int ocfs2_release_dquot(struct dquot *dquot)
 	handle = ocfs2_start_trans(osb,
 		ocfs2_calc_qdel_credits(dquot->dq_sb, dquot->dq_id.type));
 	if (IS_ERR(handle)) {
+		/*
+		 * Mark dquot as inactive to avoid endless cycle in
+		 * quota_release_workfn().
+		 */
+		clear_bit(DQ_ACTIVE_B, &dquot->dq_flags);
 		status = PTR_ERR(handle);
 		mlog_errno(status);
 		goto out_ilock;




[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