aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-08 18:51:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-08 18:51:01 -0400
commit8c68face5548cdecb770d75ad44a74aec9352d10 (patch)
tree9d6b4f8032f7ee8d19817ad9d332844794ba506c
parent861b7102b58ea55e171e503c2163efd60a4cc052 (diff)
parenta9cfcd63e8d206ce4235c355d857c4fbdf0f4587 (diff)
Merge branch 'for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 bugfix from Ted Ts'o. [ Hmm. It's possible we should make kfree() aware of error pointers, and use IS_ERR_OR_NULL rather than a NULL check. But in the meantime this is obviously the right fix. - Linus ] * 'for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: avoid trying to kfree an ERR_PTR pointer
-rw-r--r--fs/ext4/namei.c2
-rw-r--r--fs/ext4/resize.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 90a3cdca3f88..603e4ebbd0ac 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -3240,6 +3240,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
3240 &new.de, &new.inlined); 3240 &new.de, &new.inlined);
3241 if (IS_ERR(new.bh)) { 3241 if (IS_ERR(new.bh)) {
3242 retval = PTR_ERR(new.bh); 3242 retval = PTR_ERR(new.bh);
3243 new.bh = NULL;
3243 goto end_rename; 3244 goto end_rename;
3244 } 3245 }
3245 if (new.bh) { 3246 if (new.bh) {
@@ -3386,6 +3387,7 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
3386 &new.de, &new.inlined); 3387 &new.de, &new.inlined);
3387 if (IS_ERR(new.bh)) { 3388 if (IS_ERR(new.bh)) {
3388 retval = PTR_ERR(new.bh); 3389 retval = PTR_ERR(new.bh);
3390 new.bh = NULL;
3389 goto end_rename; 3391 goto end_rename;
3390 } 3392 }
3391 3393
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index bb0e80f03e2e..1e43b905ff98 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -575,6 +575,7 @@ handle_bb:
575 bh = bclean(handle, sb, block); 575 bh = bclean(handle, sb, block);
576 if (IS_ERR(bh)) { 576 if (IS_ERR(bh)) {
577 err = PTR_ERR(bh); 577 err = PTR_ERR(bh);
578 bh = NULL;
578 goto out; 579 goto out;
579 } 580 }
580 overhead = ext4_group_overhead_blocks(sb, group); 581 overhead = ext4_group_overhead_blocks(sb, group);
@@ -603,6 +604,7 @@ handle_ib:
603 bh = bclean(handle, sb, block); 604 bh = bclean(handle, sb, block);
604 if (IS_ERR(bh)) { 605 if (IS_ERR(bh)) {
605 err = PTR_ERR(bh); 606 err = PTR_ERR(bh);
607 bh = NULL;
606 goto out; 608 goto out;
607 } 609 }
608 610