/* Make sure generic_write_checks sees an up to date inode size. */
if (file->f_flags & O_APPEND) {
- rc = orangefs_inode_old_getattr(file->f_mapping->host,
- ORANGEFS_ATTR_SYS_SIZE, 0);
+ rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1);
+ if (rc == -ESTALE)
+ rc = -EIO;
if (rc) {
- gossip_err("%s: orangefs_inode_old_getattr failed, rc:%zd:.\n",
- __func__, rc);
+ gossip_err("%s: orangefs_inode_getattr failed, "
+ "rc:%zd:.\n", __func__, rc);
goto out;
}
}
* NOTE: We are only interested in file size here,
* so we set mask accordingly.
*/
- ret = orangefs_inode_old_getattr(inode,
- ORANGEFS_ATTR_SYS_SIZE, 0);
+ ret = orangefs_inode_getattr(file->f_mapping->host, 0, 1);
+ if (ret == -ESTALE)
+ ret = -EIO;
if (ret) {
gossip_debug(GOSSIP_FILE_DEBUG,
"%s:%s:%d calling make bad inode\n",