#endif
struct file *
-afs_linux_raw_open(afs_dcache_id_t *ainode, ino_t *hint)
+afs_linux_raw_open(afs_dcache_id_t *ainode)
{
struct inode *tip = NULL;
struct dentry *dp = NULL;
osi_Panic("Can't get dentry\n");
tip = dp->d_inode;
#endif
- tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
+ tip->i_flags |= S_NOATIME; /* Disable updating access times. */
#if defined(STRUCT_TASK_HAS_CRED)
/* Use stashed credentials - prevent selinux/apparmor problems */
#endif
if (IS_ERR(filp))
#if defined(LINUX_USE_FH)
- osi_Panic("Can't open file\n");
+ osi_Panic("Can't open file: %d\n", PTR_ERR(filp));
#else
osi_Panic("Can't open inode %d\n", (int) ainode->ufs);
#endif
- if (hint)
- *hint = tip->i_ino;
return filp;
}
}
memset(afile, 0, sizeof(struct osi_file));
- afile->filp = afs_linux_raw_open(ainode, &afile->inum);
+ afile->filp = afs_linux_raw_open(ainode);
afile->size = i_size_read(FILE_INODE(afile->filp));
AFS_GLOCK();
afile->offset = 0;
/* seek to the desired position. Return -1 on error. */
if (filp->f_op->llseek) {
if (filp->f_op->llseek(filp, (loff_t) uiop->uio_offset, 0) != uiop->uio_offset)
- return -1;
+ code = -1;
+ goto out;
} else
filp->f_pos = uiop->uio_offset;
code = 0;
}
+out:
if (uiop->uio_seg == AFS_UIOSYS)
TO_KERNEL_SPACE();