ksmbd: fix build with kernel 5.10

This commit is contained in:
coolsnowwolf 2024-12-18 21:05:45 +08:00
parent cab2ab7d58
commit ea8c0bcaa0

View File

@ -0,0 +1,25 @@
--- a/vfs.c
+++ b/vfs.c
@@ -1604,12 +1604,16 @@
#endif
err = vfs_rename(&rd);
#else
- err = vfs_rename(d_inode(src_dent_parent),
- src_dent,
- d_inode(dst_dent_parent),
- dst_dent,
- NULL,
- 0);
+ struct renamedata rd = {
+ .old_dir = d_inode(src_dent_parent),
+ .old_dentry = src_dent,
+ .new_dir = d_inode(dst_dent_parent),
+ .new_dentry = dst_dent,
+ .delegated_inode = NULL,
+ .flags = 0,
+ };
+
+ err = vfs_rename(&rd);
#endif
}
if (err)