Skip to content

Commit

Permalink
exfat: fix missing REQ_SYNC in exfat_update_bhs()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Aoyama, Wataru <[email protected]>
Reviewed-by: Kobayashi, Kento <[email protected]>
Reviewed-by: Sungjong Seo <[email protected]>
Signed-off-by: Yuezhang.Mo <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
YuezhangMo authored and namjaejeon committed Dec 21, 2021
1 parent 216624a commit 1c014cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -217,7 +218,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++) {
Expand Down

0 comments on commit 1c014cb

Please sign in to comment.