diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c index f29c6dade7f6..069273a2483f 100644 --- a/fs/afs/dynroot.c +++ b/fs/afs/dynroot.c @@ -145,6 +145,9 @@ static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentr ASSERTCMP(d_inode(dentry), ==, NULL); + if (flags & LOOKUP_CREATE) + return ERR_PTR(-EOPNOTSUPP); + if (dentry->d_name.len >= AFSNAMEMAX) { _leave(" = -ENAMETOOLONG"); return ERR_PTR(-ENAMETOOLONG);