Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105465
b: refs/heads/master
c: e64be33
h: refs/heads/master
i:
  105463: 760684a
v: v3
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Jul 24, 2008
1 parent a3efc3d commit 0838891
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: f4c7da02615bebcaf89f15a8d055922f515160b8
refs/heads/master: e64be33ccaceaca67c84237dff8805b861398eab
16 changes: 14 additions & 2 deletions trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
union autofs_packet_union v4_pkt;
union autofs_v5_packet_union v5_pkt;
} pkt;
struct file *pipe = NULL;
size_t pktsz;

DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
Expand Down Expand Up @@ -164,8 +165,19 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
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,
Expand Down

0 comments on commit 0838891

Please sign in to comment.