#endif
#include "osi_compat.h"
+#ifndef CURRENT_TIME
+#define CURRENT_TIME (current_kernel_time())
+#endif
+
int cache_fh_type = -1;
int cache_fh_len = -1;
newattrs.ia_ctime = CURRENT_TIME;
/* avoid notify_change() since it wants to update dentry->d_parent */
+#ifdef HAVE_LINUX_SETATTR_PREPARE
+ code = setattr_prepare(file_dentry(afile->filp), &newattrs);
+#else
code = inode_change_ok(inode, &newattrs);
+#endif
if (!code)
code = afs_inode_setattr(afile, &newattrs);
if (!code)
* down. No point in crashing when we are already shutting down
*/
if (!afile) {
- if (!afs_shuttingdown)
+ if (afs_shuttingdown == AFS_RUNNING)
osi_Panic("osi_Read called with null param");
else
return -EIO;
AFS_STATCNT(osi_Write);
if (!afile) {
- if (!afs_shuttingdown)
+ if (afs_shuttingdown == AFS_RUNNING)
osi_Panic("afs_osi_Write called with null param");
else
return -EIO;