git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
smbfs
/
proc.c
diff --git
a/fs/smbfs/proc.c
b/fs/smbfs/proc.c
index
220babe
..
feac460
100644
(file)
--- a/
fs/smbfs/proc.c
+++ b/
fs/smbfs/proc.c
@@
-8,6
+8,7
@@
*/
#include <linux/types.h>
*/
#include <linux/types.h>
+#include <linux/capability.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/fs.h>
@@
-872,11
+873,11
@@
smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
filp = fget(opt->fd);
if (!filp)
goto out;
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;
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;
server->opt = *opt;
server->generation += 1;
server->state = CONN_VALID;
@@
-897,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)
*/
/*
* 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 */
sk->sk_user_data = server;
/* chain into the data_ready callback */
@@
-970,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",
}
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) {
/* FIXME: this really should be done by smbmount. */
if (server->opt.max_xmit > SMB_MAX_PACKET_SIZE) {
@@
-1825,7
+1826,6
@@
smb_init_dirent(struct smb_sb_info *server, struct smb_fattr *fattr)
fattr->f_nlink = 1;
fattr->f_uid = server->mnt->uid;
fattr->f_gid = server->mnt->gid;
fattr->f_nlink = 1;
fattr->f_uid = server->mnt->uid;
fattr->f_gid = server->mnt->gid;
- fattr->f_blksize = SMB_ST_BLKSIZE;
fattr->f_unix = 0;
}
fattr->f_unix = 0;
}
@@
-1939,7
+1939,7
@@
static int
smb_proc_readdir_short(struct file *filp, void *dirent, filldir_t filldir,
struct smb_cache_control *ctl)
{
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;
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)
{
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;
struct smb_sb_info *server = server_from_dentry(dir);
struct qstr qname;
struct smb_fattr fattr;
@@
-2397,8
+2397,7
@@
smb_proc_readdir_long(struct file *filp, void *dirent, filldir_t filldir,
if (req->rq_rcls == ERRSRV && req->rq_err == ERRerror) {
/* a damn Win95 bug - sometimes it clags if you
ask it too fast */
if (req->rq_rcls == ERRSRV && req->rq_err == ERRerror) {
/* a damn Win95 bug - sometimes it clags if you
ask it too fast */
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/5);
+ schedule_timeout_interruptible(msecs_to_jiffies(200));
continue;
}
continue;
}
@@
-2860,7
+2859,7
@@
static int
smb_proc_readdir_null(struct file *filp, void *dirent, filldir_t filldir,
struct smb_cache_control *ctl)
{
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;
if (smb_proc_ops_wait(server) < 0)
return -EIO;
@@
-3114,7
+3113,7
@@
smb_proc_setattr_unix(struct dentry *d, struct iattr *attr,
LSET(data, 32, SMB_TIME_NO_CHANGE);
LSET(data, 40, SMB_UID_NO_CHANGE);
LSET(data, 48, SMB_GID_NO_CHANGE);
LSET(data, 32, SMB_TIME_NO_CHANGE);
LSET(data, 40, SMB_UID_NO_CHANGE);
LSET(data, 48, SMB_GID_NO_CHANGE);
-
L
SET(data, 56, smb_filetype_from_mode(attr->ia_mode));
+
D
SET(data, 56, smb_filetype_from_mode(attr->ia_mode));
LSET(data, 60, major);
LSET(data, 68, minor);
LSET(data, 76, 0);
LSET(data, 60, major);
LSET(data, 68, minor);
LSET(data, 76, 0);
@@
-3226,9
+3225,9
@@
smb_proc_settime(struct dentry *dentry, struct smb_fattr *fattr)
}
int
}
int
-smb_proc_dskattr(struct
super_block *sb
, struct kstatfs *attr)
+smb_proc_dskattr(struct
dentry *dentry
, struct kstatfs *attr)
{
{
- struct smb_sb_info *server = SMB_SB(sb);
+ struct smb_sb_info *server = SMB_SB(
dentry->d_
sb);
int result;
char *p;
long unit;
int result;
char *p;
long unit;