diff options
Diffstat (limited to 'fs/zonefs')
-rw-r--r-- | fs/zonefs/super.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index abfb17f88f9a..4a0bff65d3d6 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -786,8 +786,11 @@ static ssize_t zonefs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) if (iocb->ki_pos >= ZONEFS_I(inode)->i_max_size) return -EFBIG; - if (iocb->ki_flags & IOCB_DIRECT) - return zonefs_file_dio_write(iocb, from); + if (iocb->ki_flags & IOCB_DIRECT) { + ssize_t ret = zonefs_file_dio_write(iocb, from); + if (ret != -ENOTBLK) + return ret; + } return zonefs_file_buffered_write(iocb, from); } |