Merge tag '5.14-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6
[linux-2.6-microblaze.git] / crypto / af_alg.c
index 18cc82d..8bd288d 100644 (file)
@@ -411,7 +411,7 @@ int af_alg_make_sg(struct af_alg_sgl *sgl, struct iov_iter *iter, int len)
        if (n < 0)
                return n;
 
-       npages = (off + n + PAGE_SIZE - 1) >> PAGE_SHIFT;
+       npages = DIV_ROUND_UP(off + n, PAGE_SIZE);
        if (WARN_ON(npages == 0))
                return -EINVAL;
        /* Add one extra for linking */