mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
configfs: simplify the configfs_dirent_is_ready
Return the error directly instead of using a goto. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
417b962dde
commit
899587c8d0
|
@ -467,9 +467,8 @@ static struct dentry * configfs_lookup(struct inode *dir,
|
|||
* not complete their initialization, since the dentries of the
|
||||
* attributes won't be instantiated.
|
||||
*/
|
||||
err = -ENOENT;
|
||||
if (!configfs_dirent_is_ready(parent_sd))
|
||||
goto out;
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
||||
list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
|
||||
if (sd->s_type & CONFIGFS_NOT_PINNED) {
|
||||
|
@ -493,7 +492,6 @@ static struct dentry * configfs_lookup(struct inode *dir,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
out:
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue