diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-10-12 11:22:25 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-10-12 11:43:29 +0100 |
commit | 220c71dafaa28cbb75fd785670cf68a758347026 (patch) | |
tree | 47a974cd3ea71ba59116037b56a509c41a430b63 /fs/ceph/addr.c | |
parent | 6a9262edff8ea44e9968b6b271c36d81c6a1f841 (diff) | |
parent | 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b (diff) | |
download | lwn-220c71dafaa28cbb75fd785670cf68a758347026.tar.gz lwn-220c71dafaa28cbb75fd785670cf68a758347026.zip |
Merge tag 'v6.12-rc2' into test2
Linux 6.12-rc2
Resolved movement of asm/unaligned.h to linux/unaligned.h
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r-- | fs/ceph/addr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 53fef258c2bc..c2a9e2cc03de 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -489,8 +489,11 @@ static int ceph_init_request(struct netfs_io_request *rreq, struct file *file) rreq->io_streams[0].sreq_max_len = fsc->mount_options->rsize; out: - if (ret < 0) + if (ret < 0) { + if (got) + ceph_put_cap_refs(ceph_inode(inode), got); kfree(priv); + } return ret; } @@ -2145,7 +2148,7 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci, } pool_ns_len = pool_ns ? pool_ns->len : 0; - perm = kmalloc(sizeof(*perm) + pool_ns_len + 1, GFP_NOFS); + perm = kmalloc(struct_size(perm, pool_ns, pool_ns_len + 1), GFP_NOFS); if (!perm) { err = -ENOMEM; goto out_unlock; |