fuse: update attributes before splice read
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Aug 2016 16:17:04 +0000 (18:17 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Aug 2016 16:17:04 +0000 (18:17 +0200)
commit663ed4a5e67c50662dfc91f0da31b3756bc1f67c
tree71ba6f0707ba6e2cd208b4eb12f2fc43e1731461
parent8fba54aebbdf1f999738121922e74bf796ad60ee
fuse: update attributes before splice read

Before normal cached read fuse already updated attributes from userspace in
two cases:

 1) the end of the read was beyond current i_size

 2) in auto invalidate mode, to make sure we don't read stale data from the
    cache

The same logic would apply to reads with splice(2) as well, but in that
case the attribute refresh was missing.

This patch creates a helper, fuse_update_attr_before_read(), and calls this
in both the normal and the splice cases.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: a8894274a358 ("fuse: update attributes on aio_read")
Cc: <stable@vger.kernel.org> # v3.6+
fs/fuse/file.c
This page took 0.024504 seconds and 5 git commands to generate.