lkml.org 
[lkml]   [2002]   [Jan]   [3]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
Patch in this message
/
DateThu, 3 Jan 2002 10:18:30 +0300
FromOleg Drokin <>
Subject[PATCH] corrupted reiserfs may cause kernel to panic on lookup() sometimes.
Hello!

    Certain disk corruptions and i/o errors may cause lookup() to panic, which is wrong.
    This patch fixes the problem.
    Please apply.

Bye,
    Oleg
--- linux/fs/reiserfs/namei.c.orig	Tue Dec 25 16:27:27 2001
+++ linux/fs/reiserfs/namei.c	Tue Dec 25 16:29:13 2001
@@ -309,9 +309,10 @@
 
     while (1) {
 	retval = search_by_entry_key (dir->i_sb, &key_to_search, path_to_entry, de);
-	if (retval == IO_ERROR)
-	    // FIXME: still has to be dealt with
-	    reiserfs_panic (dir->i_sb, "zam-7001: io error in " __FUNCTION__ "\n");
+	if (retval == IO_ERROR) {
+	    reiserfs_warning ("zam-7001: io error in " __FUNCTION__ "\n");
+	    return IO_ERROR;
+	}
 
 	/* compare names for all entries having given hash value */
 	retval = linear_search_in_dir_item (&key_to_search, de, name, namelen);
\
 
 \ /
  Last update: 2005-03-22 11:15    [from the cache]
©2003-2008