rather than write_inode_now(), which steals afs inodes and puts them
on the global inode lists.
*/
void osi_VM_StoreAllSegments(struct vcache *avc)
{
-#ifdef AFS_LINUX24_ENV
struct inode *ip = (struct inode *) avc;
-
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,5)
+ /* filemap_fdatasync() only exported in 2.4.5 and above */
ReleaseWriteLock(&avc->lock);
AFS_GUNLOCK();
- write_inode_now(ip, 1);
+ filemap_fdatasync(ip->i_mapping);
+ filemap_fdatawait(ip->i_mapping);
AFS_GLOCK();
ObtainWriteLock(&avc->lock, 121);
#endif