linux-stable/fs/ceph
Hu Weiwen 3a223145bd ceph: don't truncate file in atomic_open
commit 7cb9994754 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: 124e68e740 ("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
..
Kconfig
Makefile
acl.c ceph: Propagate dentry down to inode_change_ok() 2016-09-22 10:56:19 +02:00
addr.c ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty 2021-07-20 16:21:13 +02:00
cache.c ceph: fix readpage from fscache 2017-09-07 08:35:40 +02:00
cache.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
caps.c ceph: lockdep annotations for try_nonblocking_invalidate 2021-09-26 13:36:18 +02:00
ceph_frag.c
debugfs.c ceph: don't show symlink target in debugfs/mdsc 2016-05-26 01:15:32 +02:00
dir.c ceph: ensure d_name stability in ceph_dentry_hash() 2019-05-02 09:32:01 +02:00
export.c ceph: return ceph_mdsc_do_request() errors from __get_parent() 2020-05-02 17:23:03 +02:00
file.c ceph: don't truncate file in atomic_open 2022-10-26 13:15:35 +02:00
inode.c ceph: fix fscache invalidation 2021-05-22 10:40:34 +02:00
ioctl.c ceph: fix bogus endianness change in ceph_ioctl_set_layout 2017-10-21 17:21:37 +02:00
ioctl.h
locks.c ceph: fix mandatory flock check 2016-10-03 16:13:49 +02:00
mds_client.c ceph: fix potential mdsc use-after-free crash 2020-09-03 11:21:18 +02:00
mds_client.h ceph: handle CEPH_SESSION_REJECT message 2016-10-03 16:13:50 +02:00
mdsmap.c ceph: CEPH_FEATURE_MDSENC support 2016-05-26 01:15:31 +02:00
snap.c ceph: fix ci->i_head_snapc leak 2019-05-02 09:32:01 +02:00
strings.c ceph: handle CEPH_SESSION_REJECT message 2016-10-03 16:13:50 +02:00
super.c ceph: canonicalize server path in place 2020-04-13 10:32:57 +02:00
super.h ceph: canonicalize server path in place 2020-04-13 10:32:57 +02:00
xattr.c ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr() 2019-09-10 10:31:02 +01:00