if (avc->opens != 0)
return EBUSY;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
truncate_inode_pages(&ip->i_data, 0);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+ truncate_inode_pages(ip, 0);
#else
invalidate_inode_pages(ip);
#endif
*/
void osi_VM_TryToSmush(struct vcache *avc, struct AFS_UCRED *acred, int sync)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct inode *ip = (struct inode*)avc;
truncate_inode_pages(&ip->i_data, 0);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+ struct inode *ip = (struct inode*)avc;
+
+ truncate_inode_pages(ip, 0);
#else
invalidate_inode_pages((struct inode *)avc);
#endif
*/
void osi_VM_FlushPages(struct vcache *avc, struct AFS_UCRED *credp)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct inode *ip = (struct inode*)avc;
truncate_inode_pages(&ip->i_data, 0);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+ struct inode *ip = (struct inode*)avc;
+
+ truncate_inode_pages(ip, 0);
#else
invalidate_inode_pages((struct inode*)avc);
#endif
*/
void osi_VM_Truncate(struct vcache *avc, int alen, struct AFS_UCRED *acred)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct inode *ip = (struct inode*)avc;
truncate_inode_pages(&ip->i_data, alen);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,15)
+ struct inode *ip = (struct inode*)avc;
+
+ truncate_inode_pages(ip, alen);
#else
invalidate_inode_pages((struct inode*)avc);
#endif