[folded-merged] nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty-v3.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: nilfs2: Fix nilfs_sufile_mark_dirty() not set segment usage as dirty
has been removed from the -mm tree.  Its filename was
     nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty-v3.patch

This patch was dropped because it was folded into nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty.patch

------------------------------------------------------
From: Chen Zhongjin <chenzhongjin@xxxxxxxxxx>
Subject: nilfs2: Fix nilfs_sufile_mark_dirty() not set segment usage as dirty
Date: Mon, 21 Nov 2022 17:11:41 +0800

add lock protection per Ryusuke

Link: https://lkml.kernel.org/r/20221121091141.214703-1-chenzhongjin@xxxxxxxxxx
Fixes: 9ff05123e3bf ("nilfs2: segment constructor")
Cc: stable@xxxxxxxxxxxxxxx
Reported-by: syzbot+77e4f005cb899d4268d1@xxxxxxxxxxxxxxxxxxxxxxxxx
Reported-by: Liu Shixin <liushixin2@xxxxxxxxxx>
Signed-off-by: Chen Zhongjin <chenzhongjin@xxxxxxxxxx>
Acked-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
Tested-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/nilfs2/sufile.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/nilfs2/sufile.c~nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty-v3
+++ a/fs/nilfs2/sufile.c
@@ -499,6 +499,7 @@ int nilfs_sufile_mark_dirty(struct inode
 	struct nilfs_segment_usage *su;
 	int ret;
 
+	down_write(&NILFS_MDT(sufile)->mi_sem);
 	ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &bh);
 	if (!ret) {
 		mark_buffer_dirty(bh);
@@ -509,6 +510,7 @@ int nilfs_sufile_mark_dirty(struct inode
 		kunmap_atomic(kaddr);
 		brelse(bh);
 	}
+	up_write(&NILFS_MDT(sufile)->mi_sem);
 	return ret;
 }
 
_

Patches currently in -mm which might be from chenzhongjin@xxxxxxxxxx are

nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux