X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fsmbfs%2Fproc.c;h=d517a27b7f4b7baeefb6048aef46a20d03293b21;hb=5a58c3ef22d6e5b84ff651a7d27ae2cbea9f9870;hp=40e174db9872fb0a915e83ba77d0b08975a708ff;hpb=8a84fc15ae5cafcc366dd85cf8e1ab2040679abc;p=linux-2.6 diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c index 40e174db98..d517a27b7f 100644 --- a/fs/smbfs/proc.c +++ b/fs/smbfs/proc.c @@ -873,11 +873,11 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt) filp = fget(opt->fd); if (!filp) goto out; - if (!smb_valid_socket(filp->f_dentry->d_inode)) + if (!smb_valid_socket(filp->f_path.dentry->d_inode)) 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; @@ -898,7 +898,7 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt) /* * Store the server in sock user_data (Only used by sunrpc) */ - sk = SOCKET_I(filp->f_dentry->d_inode)->sk; + sk = SOCKET_I(filp->f_path.dentry->d_inode)->sk; sk->sk_user_data = server; /* chain into the data_ready callback */ @@ -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) { @@ -1939,7 +1939,7 @@ static int smb_proc_readdir_short(struct file *filp, void *dirent, filldir_t filldir, struct smb_cache_control *ctl) { - struct dentry *dir = filp->f_dentry; + struct dentry *dir = filp->f_path.dentry; struct smb_sb_info *server = server_from_dentry(dir); struct qstr qname; struct smb_fattr fattr; @@ -2291,7 +2291,7 @@ static int smb_proc_readdir_long(struct file *filp, void *dirent, filldir_t filldir, struct smb_cache_control *ctl) { - struct dentry *dir = filp->f_dentry; + struct dentry *dir = filp->f_path.dentry; struct smb_sb_info *server = server_from_dentry(dir); struct qstr qname; struct smb_fattr fattr; @@ -2593,7 +2593,7 @@ smb_proc_getattr_ff(struct smb_sb_info *server, struct dentry *dentry, fattr->f_mtime.tv_sec = date_dos2unix(server, date, time); fattr->f_mtime.tv_nsec = 0; VERBOSE("name=%s, date=%x, time=%x, mtime=%ld\n", - mask, date, time, fattr->f_mtime); + mask, date, time, fattr->f_mtime.tv_sec); fattr->f_size = DVAL(req->rq_data, 12); /* ULONG allocation size */ fattr->attr = WVAL(req->rq_data, 20); @@ -2859,7 +2859,7 @@ static int smb_proc_readdir_null(struct file *filp, void *dirent, filldir_t filldir, struct smb_cache_control *ctl) { - struct smb_sb_info *server = server_from_dentry(filp->f_dentry); + struct smb_sb_info *server = server_from_dentry(filp->f_path.dentry); if (smb_proc_ops_wait(server) < 0) return -EIO;