android_kernel_motorola_sm6225/fs/ceph
Xiubo Li 2d0507cdd6 ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
commit 15c0a870dc44ed14e01efbdd319d232234ee639f upstream.

When truncating the inode the MDS will acquire the xlock for the
ifile Locker, which will revoke the 'Frwsxl' caps from the clients.
But when the client just releases and flushes the 'Fw' caps to MDS,
for exmaple, and once the MDS receives the caps flushing msg it
just thought the revocation has finished. Then the MDS will continue
truncating the inode and then issued the truncate notification to
all the clients. While just before the clients receives the cap
flushing ack they receive the truncation notification, the clients
will detecte that the 'issued | dirty' is still holding the 'Fw'
caps.

Cc: stable@vger.kernel.org
Link: https://tracker.ceph.com/issues/56693
Fixes: b0d7c22310 ("ceph: introduce i_truncate_mutex")
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:16:31 +02:00
..
acl.c ceph: return errors from posix_acl_equiv_mode() correctly 2018-08-02 21:26:12 +02:00
addr.c ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty 2021-07-20 16:16:11 +02:00
cache.c ceph: use timespec64 for inode timestamp 2018-08-02 21:26:12 +02:00
cache.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
caps.c ceph: don't let check_caps skip sending responses for revoke msgs 2023-08-11 11:45:22 +02:00
ceph_frag.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c bdi: use bdi_dev_name() to get device name 2021-08-08 08:54:29 +02:00
dir.c ceph: ensure d_name stability in ceph_dentry_hash() 2019-05-02 09:58:54 +02:00
export.c ceph: return ceph_mdsc_do_request() errors from __get_parent() 2020-04-29 16:31:10 +02:00
file.c ceph: don't truncate file in atomic_open 2022-10-26 13:19:18 +02:00
inode.c ceph: fix incorrect revoked caps assert in ceph_fill_file_size() 2023-10-25 11:16:31 +02:00
ioctl.c libceph, ceph: move ceph_calc_file_object_mapping() to striper.c 2018-04-02 10:12:43 +02:00
ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
locks.c ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply 2019-08-29 08:28:50 +02:00
Makefile ceph: quota: add initial infrastructure to support cephfs quotas 2018-04-02 11:17:51 +02:00
mds_client.c ceph: fix potential mdsc use-after-free crash 2020-09-03 11:24:22 +02:00
mds_client.h ceph: support cephfs' own feature bits 2018-08-13 17:55:44 +02:00
mdsmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quota.c ceph: quota: fix null pointer dereference in quota check 2018-11-27 16:13:05 +01:00
snap.c ceph: fix use-after-free bug for inodes when flushing capsnaps 2023-06-14 10:57:14 +02:00
strings.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
super.c ceph: canonicalize server path in place 2020-04-13 10:45:12 +02:00
super.h ceph: canonicalize server path in place 2020-04-13 10:45:12 +02:00
xattr.c ceph: allow ceph.dir.rctime xattr to be updatable 2022-06-14 16:59:38 +02:00