diff options
author | Theodore Ts'o <tytso@mit.edu> | 2018-11-25 17:20:31 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-11-25 17:20:31 -0500 |
commit | fb265c9cb49e2074ddcdd4de99728aefdd3b3592 (patch) | |
tree | 7504b10469a8cbe92672f54e664ae5495e797c50 /fs/ext4/ext4.h | |
parent | 2e6e902d185027f8e3cb8b7305238f7e35d6a436 (diff) | |
download | linux-fb265c9cb49e2074ddcdd4de99728aefdd3b3592.tar.bz2 |
ext4: add ext4_sb_bread() to disambiguate ENOMEM cases
Today, when sb_bread() returns NULL, this can either be because of an
I/O error or because the system failed to allocate the buffer. Since
it's an old interface, changing would require changing many call
sites.
So instead we create our own ext4_sb_bread(), which also allows us to
set the REQ_META flag.
Also fixed a problem in the xattr code where a NULL return in a
function could also mean that the xattr was not found, which could
lead to the wrong error getting returned to userspace.
Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3")
Cc: stable@kernel.org # 2.6.19
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 3f89d0ab08fc..b4621277e259 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2538,6 +2538,8 @@ extern int ext4_group_extend(struct super_block *sb, extern int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count); /* super.c */ +extern struct buffer_head *ext4_sb_bread(struct super_block *sb, + sector_t block, int op_flags); extern int ext4_seq_options_show(struct seq_file *seq, void *offset); extern int ext4_calculate_overhead(struct super_block *sb); extern void ext4_superblock_csum_set(struct super_block *sb); |