Message ID | f1b45bf6d5950678d1815a5ce70a650b483335ec.1724879414.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | fuse: convert to using folios and iomap | expand |
On 8/28/24 23:13, Josef Bacik wrote: > This combines the file_remove_privs() and file_update_time() call into > one call. > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > --- > fs/fuse/file.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/fs/fuse/file.c b/fs/fuse/file.c > index 830c09b024ae..ab531a4694b3 100644 > --- a/fs/fuse/file.c > +++ b/fs/fuse/file.c > @@ -1454,11 +1454,7 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from) > > task_io_account_write(count); > > - err = file_remove_privs(file); > - if (err) > - goto out; > - > - err = file_update_time(file); > + err = kiocb_modified(iocb); > if (err) > goto out; > Hmm, I need to discuss with Miklos if there is any interest to merge my DIO consolidation branch - it needs to be heavily updated and my main motivation to have the shared inode lock for for O_DIRECT writes is not possible. But it merges fuse_direct_write_iter (FOPEN_DIRECT_IO) and fuse_cache_write_iter into one call path (and actually fixes some FOPEN_DIRECT_IO xfstests failures). For that branch I need to have file_remove_privs separated. https://lore.kernel.org/all/20230918150313.3845114-6-bschubert@ddn.com/ As I said, it need discussion if there is interest for that branch. For current code, looks good to me. Reviewed-by: Bernd Schubert <bschubert@ddn.com>
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 830c09b024ae..ab531a4694b3 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1454,11 +1454,7 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from) task_io_account_write(count); - err = file_remove_privs(file); - if (err) - goto out; - - err = file_update_time(file); + err = kiocb_modified(iocb); if (err) goto out;
This combines the file_remove_privs() and file_update_time() call into one call. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- fs/fuse/file.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)