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;
pos = uiop->uio_offset;
if (rw == UIO_READ)
- code = filp->f_op->read(filp, iov->iov_base, count, &pos);
+ code = afs_file_read(filp, iov->iov_base, count, &pos);
else
- code = filp->f_op->write(filp, iov->iov_base, count, &pos);
+ code = afs_file_write(filp, iov->iov_base, count, &pos);
if (code < 0) {
code = -code;