diff options
author | zhangyi (F) <yi.zhang@huawei.com> | 2020-06-08 05:40:42 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2020-07-09 08:14:00 +0200 |
commit | b4962091a54c8c332e4c6c211a86b7f6d6e1f759 (patch) | |
tree | fafbe783a18a79e193fa2b2bf84b01479b915dee /fs/ext2/ext2.h | |
parent | ext2: fix improper assignment for e_value_offs (diff) | |
download | linux-b4962091a54c8c332e4c6c211a86b7f6d6e1f759.tar.xz linux-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.h | 3 |
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 *); |