linux-next: build failure after merge of the block tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

After merging the block tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/block/ublk_drv.c: In function 'ublk_char_dev_permission':
drivers/block/ublk_drv.c:2032:32: error: passing argument 1 of 'inode_permission' from incompatible pointer type [-Werror=incompatible-pointer-types]
 2032 |         err = inode_permission(&init_user_ns,
      |                                ^~~~~~~~~~~~~
      |                                |
      |                                struct user_namespace *
In file included from drivers/block/ublk_drv.c:15:
include/linux/fs.h:2474:22: note: expected 'struct mnt_idmap *' but argument is of type 'struct user_namespace *'
 2474 | int inode_permission(struct mnt_idmap *, struct inode *, int);
      |                      ^~~~~~~~~~~~~~~~~~

Caused by commit

  56f5160bc1b8 ("ublk_drv: add mechanism for supporting unprivileged ublk device")

interacting with commit

  4609e1f18e19 ("fs: port ->permission() to pass mnt_idmap")

from the vfs-idmapping tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Fri, 20 Jan 2023 09:58:46 +1100
Subject: [PATCH] fixup for "ublk_drv: add mechanism for supporting unprivileged ublk device"

interacting with "fs: port ->permission() to pass mnt_idmap"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 9f32553cb938..d47d87be098f 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2029,7 +2029,7 @@ static int ublk_char_dev_permission(struct ublk_device *ub,
 	if (stat.rdev != ub->cdev_dev.devt || !S_ISCHR(stat.mode))
 		goto exit;
 
-	err = inode_permission(&init_user_ns,
+	err = inode_permission(&nop_mnt_idmap,
 			d_backing_inode(path.dentry), mask);
 exit:
 	path_put(&path);
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

Attachment: pgpo8RbSbvcfY.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux