Message ID | 20220726083929.1684-2-tiwai@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | exfat: Fixes for ENAMETOOLONG error handling | expand |
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index c6eaf7e9ea74..bcb6445eb3b3 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -462,7 +462,7 @@ static int __exfat_resolve_path(struct inode *inode, const unsigned char *path, return namelen; /* return error value */ if ((lossy && !lookup) || !namelen) - return -EINVAL; + return (lossy & NLS_NAME_OVERLEN) ? -ENAMETOOLONG : -EINVAL; exfat_chain_set(p_dir, ei->start_clu, EXFAT_B_TO_CLU(i_size_read(inode), sbi), ei->flags);