]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Oct 2022 05:54:39 +0000 (07:54 +0200)
commit91336a72cac54265068791b07efe41c68686b630
tree11db9899a6bc611d7599703f4d9d8e38b212ff4b
parent7d550b67984d75bf209320a03ecea9e610fc4e97
ceph: don't truncate file in atomic_open

commit 6e9493a56b91a8fc2228de815ff49dff4aae9f21 upstream.

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: 71821f84a646 ("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>
[Xiubo: fixed a trivial conflict for 5.10 backport]
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/file.c