Skip to content

Commit 899587c

Browse files
author
Christoph Hellwig
committed
configfs: simplify the configfs_dirent_is_ready
Return the error directly instead of using a goto. Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 417b962 commit 899587c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

fs/configfs/dir.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,8 @@ static struct dentry * configfs_lookup(struct inode *dir,
467467
* not complete their initialization, since the dentries of the
468468
* attributes won't be instantiated.
469469
*/
470-
err = -ENOENT;
471470
if (!configfs_dirent_is_ready(parent_sd))
472-
goto out;
471+
return ERR_PTR(-ENOENT);
473472

474473
list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
475474
if (sd->s_type & CONFIGFS_NOT_PINNED) {
@@ -493,7 +492,6 @@ static struct dentry * configfs_lookup(struct inode *dir,
493492
return NULL;
494493
}
495494

496-
out:
497495
return ERR_PTR(err);
498496
}
499497

0 commit comments

Comments
 (0)