linux-fh-based-cache-20081108
[openafs.git] / src / afs / afs_segments.c
index 449ae40..35235fe 100644 (file)
@@ -432,7 +432,11 @@ afs_StoreAllSegments(register struct vcache *avc, struct vrequest *areq,
                                    shouldwake = &nomore;
                                }
                            }
+#if defined(LINUX_USE_FH)
+                           tfile = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+#else
                            tfile = afs_CFileOpen(tdc->f.inode);
+#endif
 #ifndef AFS_NOSTATS
                            xferP =
                                &(afs_stats_cmfullperf.rpc.
@@ -1045,7 +1049,11 @@ afs_TruncateAllSegments(register struct vcache *avc, afs_size_t alen,
        ObtainSharedLock(&tdc->lock, 672);
        if (newSize < tdc->f.chunkBytes) {
            UpgradeSToWLock(&tdc->lock, 673);
+#if defined(LINUX_USE_FH)
+           tfile = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+#else
            tfile = afs_CFileOpen(tdc->f.inode);
+#endif
            afs_CFileTruncate(tfile, newSize);
            afs_CFileClose(tfile);
            afs_AdjustSize(tdc, newSize);