diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2021-10-22 17:03:02 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2021-10-28 09:45:32 +0200 |
commit | d347739a0e760e9f370aa021da3feacc37d3e511 (patch) | |
tree | 7af86ada5e4c3f6dbb41103b0260fb9780d59104 /fs/fuse/dax.c | |
parent | 27ae449ba26eb6c1cd217fa28339841c55bc79e1 (diff) |
fuse: always invalidate attributes after writes
Extend the fuse_write_update_attr() helper to invalidate cached attributes
after a write.
This has already been done in all cases except in fuse_notify_store(), so
this is mostly a cleanup.
fuse_direct_write_iter() calls fuse_direct_IO() which already calls
fuse_write_update_attr(), so don't repeat that again in the former.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dax.c')
-rw-r--r-- | fs/fuse/dax.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index a73bae6497b0..713818d74de6 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -732,11 +732,8 @@ static ssize_t fuse_dax_direct_write(struct kiocb *iocb, struct iov_iter *from) ssize_t ret; ret = fuse_direct_io(&io, from, &iocb->ki_pos, FUSE_DIO_WRITE); - if (ret < 0) - return ret; - fuse_invalidate_attr_mask(inode, FUSE_STATX_MODSIZE); - fuse_write_update_attr(inode, iocb->ki_pos); + fuse_write_update_attr(inode, iocb->ki_pos, ret); return ret; } |