summaryrefslogtreecommitdiffstats
path: root/fs/ext2/ext2.h
diff options
context:
space:
mode:
authorzhangyi (F) <yi.zhang@huawei.com>2020-06-08 11:40:42 +0800
committerJan Kara <jack@suse.cz>2020-07-09 08:14:00 +0200
commitb4962091a54c8c332e4c6c211a86b7f6d6e1f759 (patch)
treefafbe783a18a79e193fa2b2bf84b01479b915dee /fs/ext2/ext2.h
parent1fcbcf06e4f159e0db39a53fe258336febbba804 (diff)
downloadlinux-stable-b4962091a54c8c332e4c6c211a86b7f6d6e1f759.tar.gz
linux-stable-b4962091a54c8c332e4c6c211a86b7f6d6e1f759.tar.bz2
linux-stable-b4962091a54c8c332e4c6c211a86b7f6d6e1f759.zip
ext2: propagate errors up to ext2_find_entry()'s callers
The same to commit <36de928641ee4> (ext4: propagate errors up to ext4_find_entry()'s callers') in ext4, also return error instead of NULL pointer in case of some error happens in ext2_find_entry() (e.g. -ENOMEM or -EIO). This could avoid a negative dentry cache entry installed even it failed to read directory block due to IO error. Link: https://lore.kernel.org/r/20200608034043.10451-1-yi.zhang@huawei.com Signed-off-by: zhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2/ext2.h')
-rw-r--r--fs/ext2/ext2.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index 8178bd38a9d6..a321ff9bf1b4 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -738,7 +738,8 @@ extern void ext2_rsv_window_add(struct super_block *sb, struct ext2_reserve_wind
/* dir.c */
extern int ext2_add_link (struct dentry *, struct inode *);
-extern ino_t ext2_inode_by_name(struct inode *, const struct qstr *);
+extern int ext2_inode_by_name(struct inode *dir,
+ const struct qstr *child, ino_t *ino);
extern int ext2_make_empty(struct inode *, struct inode *);
extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,const struct qstr *, struct page **);
extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);