]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fs: add porting notes about readlink_copy()
authorMateusz Guzik <mjguzik@gmail.com>
Tue, 3 Feb 2026 13:00:31 +0000 (14:00 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 3 Feb 2026 14:17:34 +0000 (15:17 +0100)
Calling convention has changed in  ea382199071931d1 ("vfs: support caching symlink lengths in inodes")

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://patch.msgid.link/20260203130032.315177-1-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Documentation/filesystems/porting.rst

index 3397937ed838e5e7dfacc6379a9d71481cc30914..bd4128ccbb67e985b218de9e434a8107cb0e13ef 100644 (file)
@@ -1334,3 +1334,13 @@ end_creating() and the parent will be unlocked precisely when necessary.
 
 kill_litter_super() is gone; convert to DCACHE_PERSISTENT use (as all
 in-tree filesystems have done).
+
+---
+
+**mandatory**
+
+readlink_copy() now requires link length as the 4th argument. Said length needs
+to match what strlen() would return if it was ran on the string.
+
+However, if the string is freely accessible for the duration of inode's
+lifetime, consider using inode_set_cached_link() instead.