exfat: fix write failure on kernels prior to 4.8.
rw flags agrument in write_dirty_buffer() and __sync_dirty_buffer() was changed since linux 4.8 kernels. Reported-by: kuehnelth <kuehnelth@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
2363111bfc
commit
fa4f895f67
4
misc.c
4
misc.c
@ -224,7 +224,11 @@ 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)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
write_dirty_buffer(bhs[i], REQ_SYNC);
|
||||
#else
|
||||
write_dirty_buffer(bhs[i], WRITE_SYNC);
|
||||
#endif
|
||||
}
|
||||
|
||||
for (i = 0; i < nr_bhs && sync; i++) {
|
||||
|
2
super.c
2
super.c
@ -141,7 +141,7 @@ static int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flags)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
__sync_dirty_buffer(sbi->boot_bh, REQ_SYNC | REQ_FUA | REQ_PREFLUSH);
|
||||
#else
|
||||
__sync_dirty_buffer(sbi->boot_bh, REQ_SYNC | REQ_FUA | REQ_FLUSH);
|
||||
__sync_dirty_buffer(sbi->boot_bh, WRITE_FLUSH_FUA);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user