1 // SPDX-License-Identifier: GPL-2.0
3 * QNX6 file system, Linux implementation.
9 * 01-02-2012 by Kai Bankett (chaosman@ontika.net) : first release.
10 * 16-02-2012 pagemap extension by Al Viro
16 struct dentry
*qnx6_lookup(struct inode
*dir
, struct dentry
*dentry
,
21 struct inode
*foundinode
= NULL
;
22 const char *name
= dentry
->d_name
.name
;
23 int len
= dentry
->d_name
.len
;
25 if (len
> QNX6_LONG_NAME_MAX
)
26 return ERR_PTR(-ENAMETOOLONG
);
28 ino
= qnx6_find_entry(len
, dir
, name
, &page
);
30 foundinode
= qnx6_iget(dir
->i_sb
, ino
);
32 if (IS_ERR(foundinode
)) {
33 pr_debug("lookup->iget -> error %ld\n",
35 return ERR_CAST(foundinode
);
38 pr_debug("%s(): not found %s\n", __func__
, name
);
41 d_add(dentry
, foundinode
);