Skip to content

Commit be5090d

Browse files
committed
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 bugfixes from Ted Ts'o: "A bug fix and performance regression fix for ext4" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix memory leak in xattr ext4: fix performance regression in writeback of random writes
2 parents d64dab9 + 6e4ea8e commit be5090d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

fs/ext4/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2563,7 +2563,7 @@ static int ext4_writepages(struct address_space *mapping,
25632563
break;
25642564
}
25652565
blk_finish_plug(&plug);
2566-
if (!ret && !cycled) {
2566+
if (!ret && !cycled && wbc->nr_to_write > 0) {
25672567
cycled = 1;
25682568
mpd.last_page = writeback_index - 1;
25692569
mpd.first_page = 0;

fs/ext4/xattr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,8 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
13501350
s_min_extra_isize) {
13511351
tried_min_extra_isize++;
13521352
new_extra_isize = s_min_extra_isize;
1353+
kfree(is); is = NULL;
1354+
kfree(bs); bs = NULL;
13531355
goto retry;
13541356
}
13551357
error = -1;

0 commit comments

Comments
 (0)