diff options
-rw-r--r-- | fs/9p/vfs_inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index ae8396707707..905f664b8bc6 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -660,6 +660,9 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, | |||
660 | P9_DPRINTK(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", | 660 | P9_DPRINTK(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", |
661 | dir, dentry->d_name.name, dentry, nameidata); | 661 | dir, dentry->d_name.name, dentry, nameidata); |
662 | 662 | ||
663 | if (dentry->d_name.len > NAME_MAX) | ||
664 | return ERR_PTR(-ENAMETOOLONG); | ||
665 | |||
663 | sb = dir->i_sb; | 666 | sb = dir->i_sb; |
664 | v9ses = v9fs_inode2v9ses(dir); | 667 | v9ses = v9fs_inode2v9ses(dir); |
665 | dfid = v9fs_fid_lookup(dentry->d_parent); | 668 | dfid = v9fs_fid_lookup(dentry->d_parent); |