Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44491
b: refs/heads/master
c: a71113d
h: refs/heads/master
i:
  44489: cbc6586
  44487: 68ba88e
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Dec 13, 2006
1 parent 2e85440 commit 2539927
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 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: 3cec556a84be02bcd8755422eec61f1b9bee4e2f
refs/heads/master: a71113da44063b587b5a4c2fc94c948a14f2bb43
5 changes: 3 additions & 2 deletions trunk/fs/smbfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,13 @@ smb_put_super(struct super_block *sb)
smb_close_socket(server);

if (server->conn_pid)
kill_proc(server->conn_pid, SIGTERM, 1);
kill_pid(server->conn_pid, SIGTERM, 1);

kfree(server->ops);
smb_unload_nls(server);
sb->s_fs_info = NULL;
smb_unlock_server(server);
put_pid(server->conn_pid);
kfree(server);
}

Expand Down Expand Up @@ -530,7 +531,7 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
INIT_LIST_HEAD(&server->xmitq);
INIT_LIST_HEAD(&server->recvq);
server->conn_error = 0;
server->conn_pid = 0;
server->conn_pid = NULL;
server->state = CONN_INVALID; /* no connection yet */
server->generation = 0;

Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/smbfs/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
goto out_putf;

server->sock_file = filp;
server->conn_pid = current->pid;
server->conn_pid = get_pid(task_pid(current));
server->opt = *opt;
server->generation += 1;
server->state = CONN_VALID;
Expand Down Expand Up @@ -971,8 +971,8 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
}

VERBOSE("protocol=%d, max_xmit=%d, pid=%d capabilities=0x%x\n",
server->opt.protocol, server->opt.max_xmit, server->conn_pid,
server->opt.capabilities);
server->opt.protocol, server->opt.max_xmit,
pid_nr(server->conn_pid), server->opt.capabilities);

/* FIXME: this really should be done by smbmount. */
if (server->opt.max_xmit > SMB_MAX_PACKET_SIZE) {
Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/smbfs/smbiod.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int smbiod_retry(struct smb_sb_info *server)
{
struct list_head *head;
struct smb_request *req;
pid_t pid = server->conn_pid;
struct pid *pid = get_pid(server->conn_pid);
int result = 0;

VERBOSE("state: %d\n", server->state);
Expand Down Expand Up @@ -222,7 +222,7 @@ int smbiod_retry(struct smb_sb_info *server)
/*
* Note: use the "priv" flag, as a user process may need to reconnect.
*/
result = kill_proc(pid, SIGUSR1, 1);
result = kill_pid(pid, SIGUSR1, 1);
if (result) {
/* FIXME: this is most likely fatal, umount? */
printk(KERN_ERR "smb_retry: signal failed [%d]\n", result);
Expand All @@ -233,6 +233,7 @@ int smbiod_retry(struct smb_sb_info *server)
/* FIXME: The retried requests should perhaps get a "time boost". */

out:
put_pid(pid);
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/smb_fs_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct smb_sb_info {
* generation is incremented.
*/
unsigned int generation;
pid_t conn_pid;
struct pid *conn_pid;
struct smb_conn_opt opt;
wait_queue_head_t conn_wq;
int conn_complete;
Expand Down

0 comments on commit 2539927

Please sign in to comment.