From 0cf26c7e83f3bec73c54618c3a694d9610bf8d02 Mon Sep 17 00:00:00 2001
From: Ben Fennema <bfennema@falcon.csc.calpoly.edu>
Date: Wed, 1 Oct 2003 08:44:15 -0700
Subject: [PATCH] [PATCH] UDF oops on inode read failure

This fixes an oops with failed inode reads on UDF
---
 fs/udf/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index d892081d73ab..80fc39b35f52 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -126,7 +126,8 @@ void udf_delete_inode(struct inode * inode)
 
 void udf_clear_inode(struct inode *inode)
 {
-	kfree(UDF_I_DATA(inode));
+	if (!is_bad_inode(inode))
+		kfree(UDF_I_DATA(inode));
 }
 
 void udf_discard_prealloc(struct inode * inode)
-- 
2.30.9