Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nfsd-6.1-6' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fix from Chuck Lever:

- Fix rare data corruption on READ operations

* tag 'nfsd-6.1-6' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
NFSD: Fix reads with a non-zero offset that don't end on a page boundary

+4 -3
+4 -3
fs/nfsd/vfs.c
··· 871 871 struct svc_rqst *rqstp = sd->u.data; 872 872 struct page *page = buf->page; // may be a compound one 873 873 unsigned offset = buf->offset; 874 + struct page *last_page; 874 875 875 - page += offset / PAGE_SIZE; 876 - for (int i = sd->len; i > 0; i -= PAGE_SIZE) 877 - svc_rqst_replace_page(rqstp, page++); 876 + last_page = page + (offset + sd->len - 1) / PAGE_SIZE; 877 + for (page += offset / PAGE_SIZE; page <= last_page; page++) 878 + svc_rqst_replace_page(rqstp, page); 878 879 if (rqstp->rq_res.page_len == 0) // first call 879 880 rqstp->rq_res.page_base = offset % PAGE_SIZE; 880 881 rqstp->rq_res.page_len += sd->len;