nuttx/fs/vfs
yukangzhi fa7865f109 fs/vfs: fix link() returning EXDEV instead of ENAMETOOLONG
When inode_find() for path2 fails due to ENAMETOOLONG (or ELOOP),
the else branch incorrectly falls through to the EXDEV check based
on whether target is a mountpoint.  This causes link() to report
EXDEV for overly long path2, violating POSIX which requires
ENAMETOOLONG in this case.

Fix by propagating the original inode_find() error code when it is
not ENOENT or ENOTDIR (i.e., not a simple "path does not exist"
condition).

Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
2026-08-28 23:07:24 +08:00
..
CMakeLists.txt fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
fs_chstat.c fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
fs_close.c
fs_dir.c fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
fs_dup.c
fs_dup2.c
fs_dup3.c
fs_epoll.c
fs_eventfd.c
fs_fchstat.c
fs_fcntl.c
fs_fstat.c
fs_fstatfs.c
fs_fsync.c
fs_inotify.c
fs_ioctl.c
fs_link.c fs/vfs: fix link() returning EXDEV instead of ENAMETOOLONG 2026-08-28 23:07:24 +08:00
fs_lock.c
fs_lseek.c
fs_mkdir.c
fs_open.c fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
fs_poll.c
fs_pread.c
fs_profile.c
fs_pseudofile.c
fs_pwrite.c
fs_read.c
fs_readlink.c fs/vfs: add link, symlink and readlink support for mountpt 2026-08-27 01:12:33 +08:00
fs_rename.c fs/vfs/rename: fix rename to same file and rename to subdirectory 2026-08-28 23:07:24 +08:00
fs_rmdir.c
fs_select.c
fs_sendfile.c
fs_signalfd.c
fs_stat.c fs/vfs: add lstat interface to mountpt_operations 2026-08-27 01:12:33 +08:00
fs_statfs.c
fs_symlink.c fs/vfs: add link, symlink and readlink support for mountpt 2026-08-27 01:12:33 +08:00
fs_syncfs.c
fs_timerfd.c
fs_truncate.c
fs_uio.c
fs_unlink.c fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
fs_write.c
Kconfig
Make.defs fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
vfs.h