ceph: don't leak snap_rwsem in handle_cap_grant
stable inclusion from stable-v5.10.138 commit aee18421bda6bf12a7cba6a3d7751c0e1cfd0094 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=aee18421bda6bf12a7cba6a3d7751c0e1cfd0094 -------------------------------- commit 58dd4385 upstream. When handle_cap_grant is called on an IMPORT op, then the snap_rwsem is held and the function is expected to release it before returning. It currently fails to do that in all cases which could lead to a deadlock. Fixes: 6f05b30e ("ceph: reset i_requested_max_size if file write is not wanted") Link: https://tracker.ceph.com/issues/55857Signed-off-by: NJeff Layton <jlayton@kernel.org> Reviewed-by: NLuís Henriques <lhenriques@suse.de> Signed-off-by: NIlya Dryomov <idryomov@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
Showing
想要评论请 注册 或 登录