lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <163712349419.13692.2859038330142282757@noble.neil.brown.name>
Date:   Wed, 17 Nov 2021 15:31:34 +1100
From:   "NeilBrown" <neilb@...e.de>
To:     OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:     linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Subject: [PATCH] FAT: use blkdev_issue_flush() instead of congestion_wait()


congestion_wait() in this context is just a sleep - block devices do not
in general support congestion signalling any more.

The goal here is to wait for any recently written data to get to
storage.  This can be achieved using blkdev_issue_flush().

Signed-off-by: NeilBrown <neilb@...e.de>
---
 fs/fat/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fat/file.c b/fs/fat/file.c
index 13855ba49cd9..c50a52f40e37 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -175,9 +175,9 @@ long fat_generic_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 static int fat_file_release(struct inode *inode, struct file *filp)
 {
 	if ((filp->f_mode & FMODE_WRITE) &&
-	     MSDOS_SB(inode->i_sb)->options.flush) {
+	    MSDOS_SB(inode->i_sb)->options.flush) {
 		fat_flush_inodes(inode->i_sb, inode, NULL);
-		congestion_wait(BLK_RW_ASYNC, HZ/10);
+		blkdev_issue_flush(inode->i_sb->s_bdev);
 	}
 	return 0;
 }
-- 
2.33.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ