ceph: don't truncate file in atomic_open
authorHu Weiwen <sehuww@mail.scut.edu.cn>
Fri, 1 Jul 2022 02:52:27 +0000 (10:52 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 2 Aug 2022 22:54:13 +0000 (00:54 +0200)
commit7cb9994754f8a36ae9e5ec4597c5c4c2d6c03832
tree334071085f40af0cbe049a6c412173eba845d231
parent0c04a117d77b258febb1a69da7c0cb651d4a38cc
ceph: don't truncate file in atomic_open

Clear O_TRUNC from the flags sent in the MDS create request.

`atomic_open' is called before permission check. We should not do any
modification to the file here. The caller will do the truncation
afterward.

Fixes: 124e68e74099 ("ceph: file operations")
Signed-off-by: Hu Weiwen <sehuww@mail.scut.edu.cn>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/file.c