From bf239cef52602d11dafc3742a4cdb9dfb208e5d4 Mon Sep 17 00:00:00 2001 From: k-saikrishna Date: Thu, 19 Dec 2024 16:04:13 +0530 Subject: [PATCH] Revert "fs/driver/mtd: Lock irq when erasing fs to avoid fs corruption" This reverts commit 9eb33921c1f0b00f694215e2b452400da72b7b2b. --- os/fs/driver/mtd/smart.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/os/fs/driver/mtd/smart.c b/os/fs/driver/mtd/smart.c index 89739ef7c7..a135bb4971 100644 --- a/os/fs/driver/mtd/smart.c +++ b/os/fs/driver/mtd/smart.c @@ -72,7 +72,6 @@ #include #include #include -#include #include #include #include @@ -4823,7 +4822,6 @@ static inline int smart_freesector(FAR struct smart_struct_s *dev, unsigned long static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) { FAR struct smart_struct_s *dev; - irqstate_t saved_state; int ret = OK; #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_SMARTFS) FAR struct mtd_smart_procfs_data_s *procfs_data; @@ -4927,9 +4925,7 @@ static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) #endif /* CONFIG_FS_WRITABLE */ case BIOC_BULKERASE: - saved_state = irqsave(); ret = MTD_IOCTL(dev->mtd, MTDIOC_BULKERASE, 0); - irqrestore(saved_state); fdbg("Format Finished\n"); sleep(1); goto ok_out;