[Devel] [RH7 PATCH] ext4: ext4_ext_drop_refs ignode null path

Dmitry Monakhov dmonakhov at openvz.org
Thu Jul 2 05:10:58 PDT 2015


This hank was part of following patch
[RH7 PATCH 10/10] ext4: update defragmentation codebase
Date: Thu, 18 Jun 2015 15:42:57 +0400
Message-Id: <1434627777-3815-11-git-send-email-dmonakhov at openvz.org>

But by unknown reason it was lost somewhere. This result in panic
of xfstests ext4/304

Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 fs/ext4/extents.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 37d04d3..8b4a7fc 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -584,9 +584,12 @@ static void ext4_ext_show_move(struct inode *inode, struct ext4_ext_path *path,
 
 void ext4_ext_drop_refs(struct ext4_ext_path *path)
 {
-	int depth = path->p_depth;
+	int depth;
 	int i;
 
+	if (!path)
+		return;
+	depth = path->p_depth;
 	for (i = 0; i <= depth; i++, path++)
 		if (path->p_bh) {
 			brelse(path->p_bh);
-- 
1.7.1




More information about the Devel mailing list