Commit dc1c466
ext4: propagate errors from ext4_sb_bread() in ext4_xattr_block_cache_find()
In ext4_xattr_block_cache_find(), when ext4_sb_bread() returns an error,
we will either continue to find the next ea block or return NULL to try to
insert a new ea block. But whether ext4_sb_bread() returns -EIO or -ENOMEM,
the next operation is most likely to fail with the same error. So propagate
the error returned by ext4_sb_bread() to make ext4_xattr_block_set() fail
to reduce pointless operations.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240504075526.2254349-3-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 0c0b4a4 commit dc1c466
1 file changed
+14
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2028 | 2028 | | |
2029 | 2029 | | |
2030 | 2030 | | |
2031 | | - | |
2032 | | - | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
2033 | 2038 | | |
2034 | 2039 | | |
2035 | 2040 | | |
| |||
3094 | 3099 | | |
3095 | 3100 | | |
3096 | 3101 | | |
3097 | | - | |
3098 | | - | |
| 3102 | + | |
| 3103 | + | |
3099 | 3104 | | |
3100 | 3105 | | |
3101 | 3106 | | |
| |||
3117 | 3122 | | |
3118 | 3123 | | |
3119 | 3124 | | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | | - | |
3124 | | - | |
3125 | | - | |
3126 | | - | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
3127 | 3130 | | |
3128 | 3131 | | |
3129 | 3132 | | |
| |||
0 commit comments