return err ?: ia->write.out.size;
}
-bool fuse_write_update_size(struct inode *inode, loff_t pos)
+bool fuse_write_update_attr(struct inode *inode, loff_t pos)
{
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_inode *fi = get_fuse_inode(inode);
} while (!err && iov_iter_count(ii));
if (res > 0)
- fuse_write_update_size(inode, pos);
+ fuse_write_update_attr(inode, pos);
clear_bit(FUSE_I_SIZE_UNSTABLE, &fi->state);
fuse_invalidate_attr_mask(inode, FUSE_STATX_MODSIZE);
}
fuse_invalidate_attr_mask(inode, FUSE_STATX_MODSIZE);
if (res > 0)
- fuse_write_update_size(inode, iocb->ki_pos);
+ fuse_write_update_attr(inode, iocb->ki_pos);
inode_unlock(inode);
return res;
if (iov_iter_rw(iter) == WRITE) {
if (ret > 0)
- fuse_write_update_size(inode, pos);
+ fuse_write_update_attr(inode, pos);
else if (ret < 0 && offset + count > i_size)
fuse_do_truncate(file);
}
/* we could have extended the file */
if (!(mode & FALLOC_FL_KEEP_SIZE)) {
- bool changed = fuse_write_update_size(inode, offset + length);
+ bool changed = fuse_write_update_attr(inode, offset + length);
if (changed && fm->fc->writeback_cache)
file_update_time(file);
ALIGN(pos_out + outarg.size, PAGE_SIZE) - 1);
if (fc->writeback_cache) {
- fuse_write_update_size(inode_out, pos_out + outarg.size);
+ fuse_write_update_attr(inode_out, pos_out + outarg.size);
file_update_time(file_out);
}
__poll_t fuse_file_poll(struct file *file, poll_table *wait);
int fuse_dev_release(struct inode *inode, struct file *file);
-bool fuse_write_update_size(struct inode *inode, loff_t pos);
+bool fuse_write_update_attr(struct inode *inode, loff_t pos);
int fuse_flush_times(struct inode *inode, struct fuse_file *ff);
int fuse_write_inode(struct inode *inode, struct writeback_control *wbc);