From: Yuezhang.Mo Date: Mon, 16 Aug 2021 03:30:51 +0000 (+0800) Subject: exfat: fix missing REQ_SYNC in exfat_update_bhs() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3d966521a824082952990492442c7b486fefb48c;p=linux.git 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. Reviewed-by: Andy.Wu Reviewed-by: Aoyama, Wataru Reviewed-by: Kobayashi, Kento Reviewed-by: Sungjong Seo Signed-off-by: Yuezhang.Mo Signed-off-by: Namjae Jeon --- diff --git a/fs/exfat/misc.c b/fs/exfat/misc.c index d34e6193258dd..d5bd8e6d97412 100644 --- a/fs/exfat/misc.c +++ b/fs/exfat/misc.c @@ -10,6 +10,7 @@ #include #include #include +#include #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++) {