kclient: zero_user_segments doesn't appear until 2.6.25

This commit is contained in:
Sage Weil 2009-02-26 09:23:34 -08:00
parent 13c67f63ba
commit 6ff39baa45

View File

@ -909,9 +909,13 @@ retry_locked:
if (page_off >= i_size ||
(pos_in_page == 0 && (pos+len) >= i_size &&
end_in_page - pos_in_page != PAGE_CACHE_SIZE)) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
zero_user_segments(page,
0, pos_in_page,
end_in_page, PAGE_CACHE_SIZE);
#else
simple_prepare_write(file, page, pos_in_page, end_in_page);
#endif
return 0;
}