diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 595518d9879c..bfab67d20a81 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -541,8 +541,7 @@ fuse_write_directbackend(struct vnode *vp, struct uio *uio, diff = fwi->size - fwo->size; as_written_offset = uio->uio_offset - diff; - if (as_written_offset - diff > filesize && - fuse_data_cache_mode != FUSE_CACHE_UC) + if (as_written_offset - diff > filesize) fuse_vnode_setsize(vp, as_written_offset); if (as_written_offset - diff >= filesize) fvdat->flag &= ~FN_SIZECHANGE; diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index df6ef36366f2..86a6831102f2 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -1041,8 +1041,8 @@ TEST_F(WriteThrough, writethrough) /* Deliberately leak fd. close(2) will be tested in release.cc */ } -/* With writethrough caching, writes update the cached file size */ -TEST_F(WriteThrough, update_file_size) +/* Writes that extend a file should update the cached file size */ +TEST_F(Write, update_file_size) { const char FULLPATH[] = "mountpoint/some_file.txt"; const char RELPATH[] = "some_file.txt";