android_kernel_asus_sm8350/fs/ceph
Xiubo Li 3cdce751b0 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:53:19 +02:00
..
acl.c
addr.c ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty 2021-07-20 16:10:48 +02:00
cache.c
cache.h
caps.c ceph: show tasks waiting on caps in debugfs caps file 2023-08-11 11:54:00 +02:00
ceph_frag.c
debugfs.c ceph: show tasks waiting on caps in debugfs caps file 2023-08-11 11:54:00 +02:00
dir.c ceph: set sec_context xattr on symlink creation 2020-08-21 13:05:28 +02:00
export.c ceph: fix inode leak on getattr error in __fh_to_dentry 2021-05-19 10:08:26 +02:00
file.c ceph: don't truncate file in atomic_open 2022-10-15 07:54:39 +02:00
inode.c ceph: fix incorrect revoked caps assert in ceph_fill_file_size() 2023-10-25 11:53:19 +02:00
io.c
io.h
ioctl.c
ioctl.h
Kconfig
locks.c
Makefile
mds_client.c ceph: defer stopping mdsc delayed_work 2023-08-11 11:54:01 +02:00
mds_client.h ceph: defer stopping mdsc delayed_work 2023-08-11 11:54:01 +02:00
mdsmap.c
quota.c ceph: demote quotarealm lookup warning to a debug message 2020-05-14 07:58:27 +02:00
snap.c ceph: fix use-after-free bug for inodes when flushing capsnaps 2023-06-14 10:59:57 +02:00
strings.c
super.c ceph: defer stopping mdsc delayed_work 2023-08-11 11:54:01 +02:00
super.h ceph: fix handling of "meta" errors 2021-10-27 09:54:27 +02:00
xattr.c ceph: allow ceph.dir.rctime xattr to be updatable 2022-06-14 18:12:01 +02:00