summaryrefslogtreecommitdiff
path: root/fs/configfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-25 08:43:55 +0300
committerChristoph Hellwig <hch@lst.de>2021-08-25 08:43:55 +0300
commit899587c8d0908e5124fd074d52bf05b4b0633a79 (patch)
tree3f14a6980138e814ea3ebaf75be040b59e042bec /fs/configfs
parent417b962ddeca2b70eb72d28c87541bdad4e234f8 (diff)
downloadlinux-899587c8d0908e5124fd074d52bf05b4b0633a79.tar.xz
configfs: simplify the configfs_dirent_is_ready
Return the error directly instead of using a goto. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/configfs')
-rw-r--r--fs/configfs/dir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index cf08bbde55f3..5d58569f0eea 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -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);
}