linux-stable/fs/ceph
Yan, Zheng 968b1dd03e ceph: don't skip updating wanted caps when cap is stale
[ Upstream commit 0aa971b6fd ]

1. try_get_cap_refs() fails to get caps and finds that mds_wanted
   does not include what it wants. It returns -ESTALE.
2. ceph_get_caps() calls ceph_renew_caps(). ceph_renew_caps() finds
   that inode has cap, so it calls ceph_check_caps().
3. ceph_check_caps() finds that issued caps (without checking if it's
   stale) already includes caps wanted by open file, so it skips
   updating wanted caps.

Above events can cause an infinite loop inside ceph_get_caps().

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-02 17:24:13 +02:00
..
acl.c ceph: unify inode i_ctime update 2017-06-14 19:37:23 +02:00
addr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.c The highlights include: 2017-09-12 20:03:53 -07:00
cache.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
caps.c ceph: don't skip updating wanted caps when cap is stale 2020-05-02 17:24:13 +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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dir.c ceph: ensure d_name stability in ceph_dentry_hash() 2019-05-02 09:40:29 +02:00
export.c ceph: return ceph_mdsc_do_request() errors from __get_parent() 2020-05-02 17:24:13 +02:00
file.c ceph: fix rsize/wsize capping in ceph_direct_read_write() 2018-05-16 10:10:27 +02:00
inode.c ceph: fix dentry leak in ceph_readdir_prepopulate 2019-12-01 09:13:44 +01:00
ioctl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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
locks.c ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply 2019-08-29 08:26:42 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mds_client.c ceph: check availability of mds cluster on mount after wait timeout 2020-02-28 16:36:07 +01:00
mds_client.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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
snap.c ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob() 2019-09-10 10:32:18 +01: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:34:35 +02:00
super.h ceph: canonicalize server path in place 2020-04-13 10:34:35 +02:00
xattr.c ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob() 2019-09-10 10:32:18 +01:00