ceph: ensure we have Fs caps when fetching dir link count
authorJeff Layton <jlayton@kernel.org>
Mon, 9 Nov 2020 18:14:07 +0000 (13:14 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 14 Dec 2020 22:21:47 +0000 (23:21 +0100)
commit04fabb1199d1f995d6b9a1c42c046ac4bdac2d19
tree45de0adda672462288a08f5e9948f760ffe48582
parent8ba3b8c7fba4631a6689d976264067b446af4c1e
ceph: ensure we have Fs caps when fetching dir link count

The link count for a directory is defined as inode->i_subdirs + 2,
(for "." and ".."). i_subdirs is only populated when Fs caps are held.
Ensure we grab Fs caps when fetching the link count for a directory.

[ idryomov: break unnecessarily long line ]

URL: https://tracker.ceph.com/issues/48125
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/inode.c