X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=mm%2Fshmem.c;h=73ba1df7c8ba1bcf17f0ef2ee0930c13db56730e;hb=54da5083b71f01596ac3112685920fdde4540685;hp=185836ba53ef6e23a63b6a0de7c22ebae19eac0b;hpb=063e01a29b7a8a74b622dd586831e2de6cce8064;p=cascardo%2Flinux.git diff --git a/mm/shmem.c b/mm/shmem.c index 185836ba53ef..73ba1df7c8ba 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1536,7 +1536,7 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) * holes of a sparse file, we actually need to allocate those pages, * and even mark them dirty, so it cannot exceed the max_blocks limit. */ - if (segment_eq(get_fs(), KERNEL_DS)) + if (!iter_is_iovec(to)) sgp = SGP_DIRTY; index = *ppos >> PAGE_CACHE_SHIFT;