[PATCH] exfat: fix missing REQ_SYNC in exfat_update_bhs()

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

 



If 'dirsync' is enabled, all directory updates within the
filesystem should be done synchronously. exfat_update_bh()
does as this, but exfat_update_bhs() does not.

Signed-off-by: Yuezhang.Mo <Yuezhang.Mo@xxxxxxxx>
Reviewed-by: Andy.Wu <Andy.Wu@xxxxxxxx>
Reviewed-by: Aoyama, Wataru <wataru.aoyama@xxxxxxxx>
Reviewed-by: Kobayashi, Kento <Kento.A.Kobayashi@xxxxxxxx>
---
 fs/exfat/misc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/exfat/misc.c b/fs/exfat/misc.c
index d34e6193258d..d5bd8e6d9741 100644
--- a/fs/exfat/misc.c
+++ b/fs/exfat/misc.c
@@ -10,6 +10,7 @@
 #include <linux/fs.h>
 #include <linux/slab.h>
 #include <linux/buffer_head.h>
+#include <linux/blk_types.h>
 
 #include "exfat_raw.h"
 #include "exfat_fs.h"
@@ -180,7 +181,7 @@ int exfat_update_bhs(struct buffer_head **bhs, int nr_bhs, int sync)
 		set_buffer_uptodate(bhs[i]);
 		mark_buffer_dirty(bhs[i]);
 		if (sync)
-			write_dirty_buffer(bhs[i], 0);
+			write_dirty_buffer(bhs[i], REQ_SYNC);
 	}
 
 	for (i = 0; i < nr_bhs && sync; i++) {
-- 
2.25.1
From 6760187314aae4381ff573bd78a0153a6b831e0e Mon Sep 17 00:00:00 2001
From: "Yuezhang.Mo" <Yuezhang.Mo@xxxxxxxx>
Date: Mon, 16 Aug 2021 11:30:51 +0800
Subject: [PATCH] exfat: fix missing REQ_SYNC in exfat_update_bhs()

If 'dirsync' is enabled, all directory updates within the
filesystem should be done synchronously. exfat_update_bh()
does as this, but exfat_update_bhs() does not.

Signed-off-by: Yuezhang.Mo <Yuezhang.Mo@xxxxxxxx>
Reviewed-by: Andy.Wu <Andy.Wu@xxxxxxxx>
Reviewed-by: Aoyama, Wataru <wataru.aoyama@xxxxxxxx>
Reviewed-by: Kobayashi, Kento <Kento.A.Kobayashi@xxxxxxxx>
---
 fs/exfat/misc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/exfat/misc.c b/fs/exfat/misc.c
index d34e6193258d..d5bd8e6d9741 100644
--- a/fs/exfat/misc.c
+++ b/fs/exfat/misc.c
@@ -10,6 +10,7 @@
 #include <linux/fs.h>
 #include <linux/slab.h>
 #include <linux/buffer_head.h>
+#include <linux/blk_types.h>
 
 #include "exfat_raw.h"
 #include "exfat_fs.h"
@@ -180,7 +181,7 @@ int exfat_update_bhs(struct buffer_head **bhs, int nr_bhs, int sync)
 		set_buffer_uptodate(bhs[i]);
 		mark_buffer_dirty(bhs[i]);
 		if (sync)
-			write_dirty_buffer(bhs[i], 0);
+			write_dirty_buffer(bhs[i], REQ_SYNC);
 	}
 
 	for (i = 0; i < nr_bhs && sync; i++) {
-- 
2.25.1


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux