nfs: don't zero out the rest of the page if we hit the EOF on a DIO READ
[cascardo/linux.git] / fs / nfs / direct.c
index cae26cb..594f4e7 100644 (file)
@@ -266,14 +266,6 @@ static void nfs_direct_read_completion(struct nfs_pgio_header *hdr)
                struct nfs_page *req = nfs_list_entry(hdr->pages.next);
                struct page *page = req->wb_page;
 
-               if (test_bit(NFS_IOHDR_EOF, &hdr->flags)) {
-                       if (bytes > hdr->good_bytes)
-                               zero_user(page, 0, PAGE_SIZE);
-                       else if (hdr->good_bytes - bytes < PAGE_SIZE)
-                               zero_user_segment(page,
-                                       hdr->good_bytes & ~PAGE_MASK,
-                                       PAGE_SIZE);
-               }
                if (!PageCompound(page)) {
                        if (test_bit(NFS_IOHDR_ERROR, &hdr->flags)) {
                                if (bytes < hdr->good_bytes)