#define pageoff(pp) pp->offset
#endif
+#if defined(AFS_LINUX26_ENV)
+#define UnlockPage(pp) unlock_page(pp)
+#endif
+
extern struct vcache *afs_globalVp;
extern afs_rwlock_t afs_xvcache;
*offp += count;
}
done:
+ ;
} else {
#endif /* AFS_64BIT_CLIENT */
osi_FlushPages(vcp, credp); /* ensure stale pages are gone */
ReleaseWriteLock(&vcp->lock);
}
done:
+ ;
} else {
#endif /* AFS_64BIT_CLIENT */
AFS_GUNLOCK();
}
/* filldir returns -EINVAL when the buffer is full. */
-#if (defined(AFS_LINUX24_ENV) || defined(pgoff2loff)) && defined(DECLARE_FSTYPE)
+#if defined(AFS_LINUX26_ENV) || ((defined(AFS_LINUX24_ENV) || defined(pgoff2loff)) && defined(DECLARE_FSTYPE))
{
unsigned int type = DT_UNKNOWN;
struct VenusFid afid;
* AFS Linux dentry operations
**********************************************************************/
+static int
+afs_linux_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+{
+ int err = afs_linux_revalidate(dentry);
+ if (!err)
+ generic_fillattr(dentry->d_inode, stat);
+ return err;
+}
+
/* afs_linux_revalidate
* Ensure vcache is stat'd before use. Return 0 if entry is valid.
*/
#endif
struct inode_operations afs_file_iops = {
-#if defined(AFS_LINUX24_ENV)
+#if defined(AFS_LINUX26_ENV)
+ .permission = afs_linux_permission,
+ .getattr = afs_linux_getattr,
+ .setattr = afs_notify_change,
+#elif defined(AFS_LINUX24_ENV)
.permission = afs_linux_permission,
.revalidate = afs_linux_revalidate,
.setattr = afs_notify_change,
.mkdir = afs_linux_mkdir,
.rmdir = afs_linux_rmdir,
.rename = afs_linux_rename,
+#if defined(AFS_LINUX26_ENV)
+ .getattr = afs_linux_getattr,
+#else
.revalidate = afs_linux_revalidate,
+#endif
.permission = afs_linux_permission,
};