Skip to content

Commit

Permalink
exfat: work #4
Browse files Browse the repository at this point in the history
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Dec 10, 2023
1 parent 90c661f commit 0817c68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static int exfat_file_zeroed_range(struct file *file, loff_t start, loff_t end)

static inline bool exfat_iocb_is_dsync(const struct kiocb *iocb)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
return iocb_is_dsync(iocb);
#else
return (iocb->ki_flags & IOCB_DSYNC) ||
Expand Down Expand Up @@ -676,7 +676,7 @@ static ssize_t exfat_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)
if (pos > valid_size)
pos = valid_size;

if (iocb_is_dsync(iocb) && iocb->ki_pos > pos) {
if (exfat_iocb_is_dsync(iocb) && iocb->ki_pos > pos) {
ssize_t err = vfs_fsync_range(file, pos, iocb->ki_pos - 1,
iocb->ki_flags & IOCB_SYNC);
if (err < 0)
Expand Down

0 comments on commit 0817c68

Please sign in to comment.