summaryrefslogtreecommitdiff
path: root/fs/qnx6/dir.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-09 23:13:18 -0400
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:31:55 +0200
commit5563040e852994c4ad40b189d3ea4ed253ace232 (patch)
treec24e2ea0b48de0fc5a24833eb0775f746c8213ab /fs/qnx6/dir.c
parentb2aa61556fcfa83639507d329d48cd6e2f7ac487 (diff)
qnx6: Convert qnx6_find_entry() to qnx6_find_ino()
It's hard to return a directory entry from qnx6_find_entry() because it might be a long dir_entry with a different format. So stick with the convention of returning an inode number, but rename it to qnx6_find_ino() to reflect what it actually does, and move the call to qnx6_put_page() inside the function which lets us get rid of the res_page parameter. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/qnx6/dir.c')
-rw-r--r--fs/qnx6/dir.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/qnx6/dir.c b/fs/qnx6/dir.c
index bc7f20dda579..daf9a335ba22 100644
--- a/fs/qnx6/dir.c
+++ b/fs/qnx6/dir.c
@@ -213,8 +213,7 @@ static unsigned qnx6_match(struct super_block *s, int len, const char *name,
}
-unsigned qnx6_find_entry(int len, struct inode *dir, const char *name,
- struct page **res_page)
+unsigned qnx6_find_ino(int len, struct inode *dir, const char *name)
{
struct super_block *s = dir->i_sb;
struct qnx6_inode_info *ei = QNX6_I(dir);
@@ -225,8 +224,6 @@ unsigned qnx6_find_entry(int len, struct inode *dir, const char *name,
struct qnx6_dir_entry *de;
struct qnx6_long_dir_entry *lde;
- *res_page = NULL;
-
if (npages == 0)
return 0;
start = ei->i_dir_start_lookup;
@@ -267,8 +264,8 @@ unsigned qnx6_find_entry(int len, struct inode *dir, const char *name,
return 0;
found:
- *res_page = &folio->page;
ei->i_dir_start_lookup = n;
+ qnx6_put_page(&folio->page);
return ino;
}