Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212965
b: refs/heads/master
c: 2a4df5d
h: refs/heads/master
i:
  212963: a7a4b5d
v: v3
  • Loading branch information
Petr Vandrovec authored and Arnd Bergmann committed Oct 5, 2010
1 parent 6f308e3 commit fd9c32c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: b89f432133851a01c0d28822f11cbdcc15781a75
refs/heads/master: 2a4df5d33202e99c015928bf2a2dfd8ad03e53bc
14 changes: 9 additions & 5 deletions trunk/fs/ncpfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,12 @@ ncp_evict_inode(struct inode *inode)

static void ncp_stop_tasks(struct ncp_server *server) {
struct sock* sk = server->ncp_sock->sk;


lock_sock(sk);
sk->sk_error_report = server->error_report;
sk->sk_data_ready = server->data_ready;
sk->sk_write_space = server->write_space;
release_sock(sk);
del_timer_sync(&server->timeout_tm);
flush_scheduled_work();
}
Expand Down Expand Up @@ -605,10 +607,6 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
mutex_init(&server->rcv.creq_mutex);
server->tx.creq = NULL;
server->rcv.creq = NULL;
server->data_ready = sock->sk->sk_data_ready;
server->write_space = sock->sk->sk_write_space;
server->error_report = sock->sk->sk_error_report;
sock->sk->sk_user_data = server;

init_timer(&server->timeout_tm);
#undef NCP_PACKET_SIZE
Expand All @@ -625,6 +623,11 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
if (server->rxbuf == NULL)
goto out_txbuf;

lock_sock(sock->sk);
server->data_ready = sock->sk->sk_data_ready;
server->write_space = sock->sk->sk_write_space;
server->error_report = sock->sk->sk_error_report;
sock->sk->sk_user_data = server;
sock->sk->sk_data_ready = ncp_tcp_data_ready;
sock->sk->sk_error_report = ncp_tcp_error_report;
if (sock->type == SOCK_STREAM) {
Expand All @@ -640,6 +643,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
server->timeout_tm.data = (unsigned long)server;
server->timeout_tm.function = ncpdgram_timeout_call;
}
release_sock(sock->sk);

ncp_lock_server(server);
error = ncp_connect(server);
Expand Down

0 comments on commit fd9c32c

Please sign in to comment.