mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
29 lines
561 B
Diff
29 lines
561 B
Diff
--- a/vfs.c
|
|
+++ b/vfs.c
|
|
@@ -1604,12 +1604,25 @@
|
|
#endif
|
|
err = vfs_rename(&rd);
|
|
#else
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 230)
|
|
+ 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);
|
|
+#else
|
|
err = vfs_rename(d_inode(src_dent_parent),
|
|
src_dent,
|
|
d_inode(dst_dent_parent),
|
|
dst_dent,
|
|
NULL,
|
|
0);
|
|
+#endif
|
|
#endif
|
|
}
|
|
if (err)
|