[openwrt/openwrt] ksmbd: Support kernel 5.10.220

LEDE Commits lede-commits at lists.infradead.org
Sun Jul 7 13:23:47 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/b9aeaf778c2df0471b094aef4e9fab90f4a8fdb5

commit b9aeaf778c2df0471b094aef4e9fab90f4a8fdb5
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Jul 4 22:47:31 2024 +0200

    ksmbd: Support kernel 5.10.220
    
    In kernel 5.10.220 many file system related patches were backported. One
    of them changed the signature of vfs_rename(). Extend the version check
    for 5.10.220.
    
    Link: https://github.com/openwrt/openwrt/pull/15843
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../ksmbd/patches/02-kernel-5.10.220-build.patch   | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/package/kernel/ksmbd/patches/02-kernel-5.10.220-build.patch b/package/kernel/ksmbd/patches/02-kernel-5.10.220-build.patch
new file mode 100644
index 0000000000..d416fa8e77
--- /dev/null
+++ b/package/kernel/ksmbd/patches/02-kernel-5.10.220-build.patch
@@ -0,0 +1,25 @@
+vfs_rename() was changed in 5.10.220, see:
+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=e864d4d834f820c8be01c9d048cdab6051fe3932
+
+--- a/vfs.c
++++ b/vfs.c
+@@ -1074,12 +1074,18 @@ static int __ksmbd_vfs_rename(struct ksm
+ 
+ 	err = -ENOTEMPTY;
+ 	if (dst_dent != trap_dent && !d_really_is_positive(dst_dent)) {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) || \
++	(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 220) && \
++	 LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
+ 		struct renamedata rd = {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
+ 			.old_mnt_userns	= src_user_ns,
++#endif
+ 			.old_dir	= d_inode(src_dent_parent),
+ 			.old_dentry	= src_dent,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
+ 			.new_mnt_userns	= dst_user_ns,
++#endif
+ 			.new_dir	= d_inode(dst_dent_parent),
+ 			.new_dentry	= dst_dent,
+ 		};




More information about the lede-commits mailing list