diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0da6c91db0bc..625950258c87 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7894,7 +7894,7 @@ static ssize_t check_direct_IO(struct btrfs_fs_info *fs_info, { int seg; int i; - unsigned int blocksize_mask = fs_info->sectorsize - 1; + unsigned int blocksize_mask = PAGE_SIZE - 1; ssize_t retval = -EINVAL; if (offset & blocksize_mask)
For incoming subpage support, we still can only submit full page write, thus the requirement for direct IO alignment should still be page size, not sector size. Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)