|
@@ -99,6 +99,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
|
|
union autofs_packet_union v4_pkt;
|
|
union autofs_packet_union v4_pkt;
|
|
union autofs_v5_packet_union v5_pkt;
|
|
union autofs_v5_packet_union v5_pkt;
|
|
} pkt;
|
|
} pkt;
|
|
|
|
+ struct file *pipe = NULL;
|
|
size_t pktsz;
|
|
size_t pktsz;
|
|
|
|
|
|
DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
|
|
DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
|
|
@@ -164,8 +165,19 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (autofs4_write(sbi->pipe, &pkt, pktsz))
|
|
|
|
- autofs4_catatonic_mode(sbi);
|
|
|
|
|
|
+ /* Check if we have become catatonic */
|
|
|
|
+ mutex_lock(&sbi->wq_mutex);
|
|
|
|
+ if (!sbi->catatonic) {
|
|
|
|
+ pipe = sbi->pipe;
|
|
|
|
+ get_file(pipe);
|
|
|
|
+ }
|
|
|
|
+ mutex_unlock(&sbi->wq_mutex);
|
|
|
|
+
|
|
|
|
+ if (pipe) {
|
|
|
|
+ if (autofs4_write(pipe, &pkt, pktsz))
|
|
|
|
+ autofs4_catatonic_mode(sbi);
|
|
|
|
+ fput(pipe);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
static int autofs4_getpath(struct autofs_sb_info *sbi,
|
|
static int autofs4_getpath(struct autofs_sb_info *sbi,
|