Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 197264
Collapse All | Expand All

(-)a/fs/nfs/write.c (-4 / +13 lines)
Lines 174-181 static void nfs_mark_uptodate(struct page *page, unsigned int base, unsigned int Link Here
174
		return;
174
		return;
175
	if (count != nfs_page_length(page))
175
	if (count != nfs_page_length(page))
176
		return;
176
		return;
177
	if (count != PAGE_CACHE_SIZE)
178
		zero_user_page(page, count, PAGE_CACHE_SIZE - count, KM_USER0);
179
	SetPageUptodate(page);
177
	SetPageUptodate(page);
180
}
178
}
181
179
Lines 627-633 static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, Link Here
627
				return ERR_PTR(error);
625
				return ERR_PTR(error);
628
			}
626
			}
629
			spin_unlock(&inode->i_lock);
627
			spin_unlock(&inode->i_lock);
630
			return new;
628
			req = new;
629
			goto zero_page;
631
		}
630
		}
632
		spin_unlock(&inode->i_lock);
631
		spin_unlock(&inode->i_lock);
633
632
Lines 655-667 static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, Link Here
655
	if (offset < req->wb_offset) {
654
	if (offset < req->wb_offset) {
656
		req->wb_offset = offset;
655
		req->wb_offset = offset;
657
		req->wb_pgbase = offset;
656
		req->wb_pgbase = offset;
658
		req->wb_bytes = rqend - req->wb_offset;
657
		req->wb_bytes = max(end, rqend) - req->wb_offset;
658
		goto zero_page;
659
	}
659
	}
660
660
661
	if (end > rqend)
661
	if (end > rqend)
662
		req->wb_bytes = end - req->wb_offset;
662
		req->wb_bytes = end - req->wb_offset;
663
663
664
	return req;
664
	return req;
665
zero_page:
666
	/* If this page might potentially be marked as up to date,
667
	 * then we need to zero any uninitalised data. */
668
	if (req->wb_pgbase == 0 && req->wb_bytes != PAGE_CACHE_SIZE
669
			&& !PageUptodate(req->wb_page))
670
		zero_user_page(req->wb_page, req->wb_bytes,
671
				PAGE_CACHE_SIZE - req->wb_bytes,
672
				KM_USER0);
673
	return req;
665
}
674
}
666
675
667
int nfs_flush_incompatible(struct file *file, struct page *page)
676
int nfs_flush_incompatible(struct file *file, struct page *page)

Return to bug 197264