ceph: set pool_ns in new inode layout for async creates
authorJeff Layton <jlayton@kernel.org>
Wed, 26 Jan 2022 17:36:49 +0000 (12:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:27:01 +0000 (17:27 +0100)
commit2aac1eda4638e1be3530eaa3b69f3147d88ea2e6
tree8d63c3b4fbe0d4adeaef5575f66d19f84dd7f5d3
parent36d433ae3242aa714176378850e6d1a5a3e78f18
ceph: set pool_ns in new inode layout for async creates

commit 4584a768f22b7669cdebabc911543621ac661341 upstream.

Dan reported that he was unable to write to files that had been
asynchronously created when the client's OSD caps are restricted to a
particular namespace.

The issue is that the layout for the new inode is only partially being
filled. Ensure that we populate the pool_ns_data and pool_ns_len in the
iinfo before calling ceph_fill_inode.

Cc: stable@vger.kernel.org
URL: https://tracker.ceph.com/issues/54013
Fixes: 9a8d03ca2e2c ("ceph: attempt to do async create when possible")
Reported-by: Dan van der Ster <dan@vanderster.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/file.c