kdbus: porting to to 4.19 32/256232/1
authorŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 26 Mar 2021 21:41:29 +0000 (22:41 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 31 Mar 2021 06:05:10 +0000 (08:05 +0200)
The following changes were made to adapt kdbus driver to 4.19 kernel

- use memfd_fcntl() instead of shmem_get_seals()

Change-Id: Iff24cd3c429310c3af748657a24a5e35db738635
Fixes: 5aadc431a593 ("shmem: rename functions that are memfd-related")
Fixes: 5d752600a8c3 ("mm: restructure memfd code")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
ipc/kdbus/message.c

index 8aef83d..17475a6 100644 (file)
 #include <linux/cred.h>
 #include <linux/file.h>
 #include <linux/init.h>
+#include <linux/memfd.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/sched.h>
-#include <linux/shmem_fs.h>
 #include <linux/sizes.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
@@ -263,7 +263,7 @@ static struct file *kdbus_get_memfd(const struct kdbus_memfd *memfd)
        if (!f)
                return ERR_PTR(-EBADF);
 
-       s = shmem_get_seals(f);
+       s = memfd_fcntl(f, F_GET_SEALS, 0);
        if (s < 0)
                ret = ERR_PTR(-EMEDIUMTYPE);
        else if ((s & m) != m)