oracleasm/oracleasm-work-with-6.4-kernel.patch

42 lines
1.7 KiB
Diff

From: Lee Duncan <lduncan@suse.com>
Date: Fri 08 Sep 2023 09:43:19 AM PDT
Subject: [PATCH] oracleasm: work with the 6.4 kernel
Patch-mainline: never (oracleasm-specific)
Use iov_iter_get_pages_alloc2() instead of
iov_iter_get_pages_alloc(), since the latter has
changed.
The inode operations for "mknod" and "create" have
changed in struct inode_operations.
---
--- a/drivers/block/oracleasm/driver.c 2023-09-01 09:19:56.864976427 -0700
+++ b/drivers/block/oracleasm/driver.c 2023-09-05 11:46:56.625387646 -0700
@@ -499,7 +499,7 @@ static void destroy_requestcache(void)
/*
* Disk file creation in the disks directory.
*/
-static int asmfs_mknod(__attribute__ ((unused)) struct user_namespace *asmfs_userns,
+static int asmfs_mknod(__attribute__ ((unused)) struct mnt_idmap *id,
struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
{
struct inode * inode;
@@ -531,7 +531,7 @@ static int asmfs_mknod(__attribute__ ((u
/*
* Instance file creation in the iid directory.
*/
-static int asmfs_create(__attribute__ ((unused)) struct user_namespace *asmfs_userns,
+static int asmfs_create(__attribute__ ((unused)) struct mnt_idmap *id,
struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
{
struct inode *inode;
@@ -1157,7 +1157,7 @@ static struct bio *asm_bio_map_user_iov(
size_t offs, added = 0;
int npages;
- bytes = iov_iter_get_pages_alloc(iter, &pages, LONG_MAX, &offs);
+ bytes = iov_iter_get_pages_alloc2(iter, &pages, LONG_MAX, &offs);
if (unlikely(bytes <= 0)) {
ret = bytes ? bytes : -EFAULT;
goto out_unmap;