]> git.baikalelectronics.ru Git - kernel.git/commitdiff
fuse: add file_modified() to fallocate
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 28 Oct 2022 12:25:20 +0000 (14:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 16:57:55 +0000 (17:57 +0100)
commit 1a2df5444ce3f5f712c33fd2dbb7f684d23bd409 upstream.

Add missing file_modified() call to fuse_file_fallocate().  Without this
fallocate on fuse failed to clear privileges.

Fixes: 39faa40026dd ("fuse: add FALLOCATE operation")
Cc: <stable@vger.kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/file.c

index efb2a487129190c1c118c367febac0bd400a4726..8c799250ff396e3427f5ba2c24448331994d74a7 100644 (file)
@@ -3239,6 +3239,10 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
                        goto out;
        }
 
+       err = file_modified(file);
+       if (err)
+               goto out;
+
        if (!(mode & FALLOC_FL_KEEP_SIZE))
                set_bit(FUSE_I_SIZE_UNSTABLE, &fi->state);