Skip to content

Commit

Permalink
ext4: Use return value from sb_issue_discard()
Browse files Browse the repository at this point in the history
Use return value from sb_issue_discard() as return value in
ext4_issue_discard(). Since sb_issue_discard() may result in more
serious errors than just -EOPNOTSUPP it is worth to inform user of this
function about them to handle error cases properly.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Lukas Czerner authored and Theodore Ts'o committed Oct 28, 2010
1 parent 8778369 commit 77ca6cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2603,7 +2603,7 @@ int ext4_mb_release(struct super_block *sb)
return 0;
}

static inline void ext4_issue_discard(struct super_block *sb,
static inline int ext4_issue_discard(struct super_block *sb,
ext4_group_t block_group, ext4_grpblk_t block, int count)
{
int ret;
Expand All @@ -2617,6 +2617,7 @@ static inline void ext4_issue_discard(struct super_block *sb,
ext4_warning(sb, "discard not supported, disabling");
clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
}
return ret;
}

/*
Expand Down

0 comments on commit 77ca6cd

Please sign in to comment.