fuse: factor out helper fuse_truncate_update_attr()
authorAmir Goldstein <amir73il@gmail.com>
Thu, 1 Feb 2024 11:48:59 +0000 (13:48 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 23 Feb 2024 16:36:32 +0000 (17:36 +0100)
commit0c9d708953d02f74cea05a01cf3e2c8f5a9fbaf4
tree69eb010ac55940ffc8f89859df7daa06990c4cca
parent9bbb6717dfd286a2861ca33273f4d7c3e65423b0
fuse: factor out helper fuse_truncate_update_attr()

fuse_finish_open() is called from fuse_open_common() and from
fuse_create_open().  In the latter case, the O_TRUNC flag is always
cleared in finish_open()m before calling into fuse_finish_open().

Move the bits that update attribute cache post O_TRUNC open into a
helper and call this helper from fuse_open_common() directly.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c