Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283222
b: refs/heads/master
c: 8753333
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Jan 11, 2012
1 parent 68b3392 commit 54cc74f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4041bcdc7bef06a2fb29c57394c713a74bd13b08
refs/heads/master: 8753333266be67ff3a984ac1f6566d31c260bee4
25 changes: 14 additions & 11 deletions trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,

pkt.hdr.proto_version = sbi->version;
pkt.hdr.type = type;
mutex_lock(&sbi->wq_mutex);

/* Check if we have become catatonic */
if (sbi->catatonic) {
mutex_unlock(&sbi->wq_mutex);
return;
}
switch (type) {
/* Kernel protocol v4 missing and expire packets */
case autofs_ptype_missing:
Expand Down Expand Up @@ -163,22 +170,18 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
}
default:
printk("autofs4_notify_daemon: bad type %d!\n", type);
mutex_unlock(&sbi->wq_mutex);
return;
}

/* Check if we have become catatonic */
mutex_lock(&sbi->wq_mutex);
if (!sbi->catatonic) {
pipe = sbi->pipe;
get_file(pipe);
}
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);
}
if (autofs4_write(pipe, &pkt, pktsz))
autofs4_catatonic_mode(sbi);
fput(pipe);
}

static int autofs4_getpath(struct autofs_sb_info *sbi,
Expand Down

0 comments on commit 54cc74f

Please sign in to comment.