fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / fs / autofs / waitq.c
index 1fcaa15..19a9caf 100644 (file)
@@ -41,6 +41,7 @@ void autofs_catatonic_mode(struct autofs_sb_info *sbi)
                wq = nwq;
        }
        fput(sbi->pipe);        /* Close the pipe */
+       sbi->pipe = NULL;
        autofs_hash_dputall(&sbi->dirhash); /* Remove all dentry pointers */
 }
 
@@ -150,10 +151,8 @@ int autofs_wait(struct autofs_sb_info *sbi, struct qstr *name)
        if ( sbi->catatonic ) {
                /* We might have slept, so check again for catatonic mode */
                wq->status = -ENOENT;
-               if ( wq->name ) {
-                       kfree(wq->name);
-                       wq->name = NULL;
-               }
+               kfree(wq->name);
+               wq->name = NULL;
        }
 
        if ( wq->name ) {