Hu Weiwen 3a223145bd ceph: don't truncate file in atomic_open
commit 7cb9994754f8a36ae9e5ec4597c5c4c2d6c03832 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: 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>
[Xiubo: fixed a trivial conflict for 4.9 backport]
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 13:15:35 +02:00
..
2020-01-29 10:24:34 +01:00
2019-08-06 18:29:38 +02:00
2022-08-25 11:09:24 +02:00
2019-03-13 14:04:52 -07:00
2018-12-21 14:11:31 +01:00
2018-02-17 13:21:15 +01:00
2021-12-14 10:04:48 +01:00
2017-06-14 15:06:01 +02:00