aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smbfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/smbfs')
-rw-r--r--fs/smbfs/cache.c2
-rw-r--r--fs/smbfs/dir.c6
-rw-r--r--fs/smbfs/file.c14
-rw-r--r--fs/smbfs/inode.c5
-rw-r--r--fs/smbfs/proc.c16
-rw-r--r--fs/smbfs/smbiod.c5
-rw-r--r--fs/smbfs/sock.c4
7 files changed, 27 insertions, 25 deletions
diff --git a/fs/smbfs/cache.c b/fs/smbfs/cache.c
index 74b86d9725a6..8182f0542a21 100644
--- a/fs/smbfs/cache.c
+++ b/fs/smbfs/cache.c
@@ -125,7 +125,7 @@ smb_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
125 struct smb_cache_control *ctrl, struct qstr *qname, 125 struct smb_cache_control *ctrl, struct qstr *qname,
126 struct smb_fattr *entry) 126 struct smb_fattr *entry)
127{ 127{
128 struct dentry *newdent, *dentry = filp->f_dentry; 128 struct dentry *newdent, *dentry = filp->f_path.dentry;
129 struct inode *newino, *inode = dentry->d_inode; 129 struct inode *newino, *inode = dentry->d_inode;
130 struct smb_cache_control ctl = *ctrl; 130 struct smb_cache_control ctl = *ctrl;
131 int valid = 0; 131 int valid = 0;
diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c
index 70d9c5a37f5a..b1e58d1ac9ca 100644
--- a/fs/smbfs/dir.c
+++ b/fs/smbfs/dir.c
@@ -78,7 +78,7 @@ struct inode_operations smb_dir_inode_operations_unix =
78static int 78static int
79smb_readdir(struct file *filp, void *dirent, filldir_t filldir) 79smb_readdir(struct file *filp, void *dirent, filldir_t filldir)
80{ 80{
81 struct dentry *dentry = filp->f_dentry; 81 struct dentry *dentry = filp->f_path.dentry;
82 struct inode *dir = dentry->d_inode; 82 struct inode *dir = dentry->d_inode;
83 struct smb_sb_info *server = server_from_dentry(dentry); 83 struct smb_sb_info *server = server_from_dentry(dentry);
84 union smb_dir_cache *cache = NULL; 84 union smb_dir_cache *cache = NULL;
@@ -238,12 +238,12 @@ out:
238static int 238static int
239smb_dir_open(struct inode *dir, struct file *file) 239smb_dir_open(struct inode *dir, struct file *file)
240{ 240{
241 struct dentry *dentry = file->f_dentry; 241 struct dentry *dentry = file->f_path.dentry;
242 struct smb_sb_info *server; 242 struct smb_sb_info *server;
243 int error = 0; 243 int error = 0;
244 244
245 VERBOSE("(%s/%s)\n", dentry->d_parent->d_name.name, 245 VERBOSE("(%s/%s)\n", dentry->d_parent->d_name.name,
246 file->f_dentry->d_name.name); 246 file->f_path.dentry->d_name.name);
247 247
248 /* 248 /*
249 * Directory timestamps in the core protocol aren't updated 249 * Directory timestamps in the core protocol aren't updated
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c
index 50784d13c87b..e50533a79517 100644
--- a/fs/smbfs/file.c
+++ b/fs/smbfs/file.c
@@ -102,7 +102,7 @@ static int
102smb_readpage(struct file *file, struct page *page) 102smb_readpage(struct file *file, struct page *page)
103{ 103{
104 int error; 104 int error;
105 struct dentry *dentry = file->f_dentry; 105 struct dentry *dentry = file->f_path.dentry;
106 106
107 page_cache_get(page); 107 page_cache_get(page);
108 error = smb_readpage_sync(dentry, page); 108 error = smb_readpage_sync(dentry, page);
@@ -205,7 +205,7 @@ static int
205smb_updatepage(struct file *file, struct page *page, unsigned long offset, 205smb_updatepage(struct file *file, struct page *page, unsigned long offset,
206 unsigned int count) 206 unsigned int count)
207{ 207{
208 struct dentry *dentry = file->f_dentry; 208 struct dentry *dentry = file->f_path.dentry;
209 209
210 DEBUG1("(%s/%s %d@%lld)\n", DENTRY_PATH(dentry), count, 210 DEBUG1("(%s/%s %d@%lld)\n", DENTRY_PATH(dentry), count,
211 ((unsigned long long)page->index << PAGE_CACHE_SHIFT) + offset); 211 ((unsigned long long)page->index << PAGE_CACHE_SHIFT) + offset);
@@ -218,7 +218,7 @@ smb_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
218 unsigned long nr_segs, loff_t pos) 218 unsigned long nr_segs, loff_t pos)
219{ 219{
220 struct file * file = iocb->ki_filp; 220 struct file * file = iocb->ki_filp;
221 struct dentry * dentry = file->f_dentry; 221 struct dentry * dentry = file->f_path.dentry;
222 ssize_t status; 222 ssize_t status;
223 223
224 VERBOSE("file %s/%s, count=%lu@%lu\n", DENTRY_PATH(dentry), 224 VERBOSE("file %s/%s, count=%lu@%lu\n", DENTRY_PATH(dentry),
@@ -243,7 +243,7 @@ out:
243static int 243static int
244smb_file_mmap(struct file * file, struct vm_area_struct * vma) 244smb_file_mmap(struct file * file, struct vm_area_struct * vma)
245{ 245{
246 struct dentry * dentry = file->f_dentry; 246 struct dentry * dentry = file->f_path.dentry;
247 int status; 247 int status;
248 248
249 VERBOSE("file %s/%s, address %lu - %lu\n", 249 VERBOSE("file %s/%s, address %lu - %lu\n",
@@ -264,7 +264,7 @@ static ssize_t
264smb_file_sendfile(struct file *file, loff_t *ppos, 264smb_file_sendfile(struct file *file, loff_t *ppos,
265 size_t count, read_actor_t actor, void *target) 265 size_t count, read_actor_t actor, void *target)
266{ 266{
267 struct dentry *dentry = file->f_dentry; 267 struct dentry *dentry = file->f_path.dentry;
268 ssize_t status; 268 ssize_t status;
269 269
270 VERBOSE("file %s/%s, pos=%Ld, count=%d\n", 270 VERBOSE("file %s/%s, pos=%Ld, count=%d\n",
@@ -323,7 +323,7 @@ smb_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
323 unsigned long nr_segs, loff_t pos) 323 unsigned long nr_segs, loff_t pos)
324{ 324{
325 struct file * file = iocb->ki_filp; 325 struct file * file = iocb->ki_filp;
326 struct dentry * dentry = file->f_dentry; 326 struct dentry * dentry = file->f_path.dentry;
327 ssize_t result; 327 ssize_t result;
328 328
329 VERBOSE("file %s/%s, count=%lu@%lu\n", 329 VERBOSE("file %s/%s, count=%lu@%lu\n",
@@ -355,7 +355,7 @@ static int
355smb_file_open(struct inode *inode, struct file * file) 355smb_file_open(struct inode *inode, struct file * file)
356{ 356{
357 int result; 357 int result;
358 struct dentry *dentry = file->f_dentry; 358 struct dentry *dentry = file->f_path.dentry;
359 int smb_mode = (file->f_mode & O_ACCMODE) - 1; 359 int smb_mode = (file->f_mode & O_ACCMODE) - 1;
360 360
361 lock_kernel(); 361 lock_kernel();
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 4af4cd729a5a..84dfe3f3482e 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -482,12 +482,13 @@ smb_put_super(struct super_block *sb)
482 smb_close_socket(server); 482 smb_close_socket(server);
483 483
484 if (server->conn_pid) 484 if (server->conn_pid)
485 kill_proc(server->conn_pid, SIGTERM, 1); 485 kill_pid(server->conn_pid, SIGTERM, 1);
486 486
487 kfree(server->ops); 487 kfree(server->ops);
488 smb_unload_nls(server); 488 smb_unload_nls(server);
489 sb->s_fs_info = NULL; 489 sb->s_fs_info = NULL;
490 smb_unlock_server(server); 490 smb_unlock_server(server);
491 put_pid(server->conn_pid);
491 kfree(server); 492 kfree(server);
492} 493}
493 494
@@ -530,7 +531,7 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
530 INIT_LIST_HEAD(&server->xmitq); 531 INIT_LIST_HEAD(&server->xmitq);
531 INIT_LIST_HEAD(&server->recvq); 532 INIT_LIST_HEAD(&server->recvq);
532 server->conn_error = 0; 533 server->conn_error = 0;
533 server->conn_pid = 0; 534 server->conn_pid = NULL;
534 server->state = CONN_INVALID; /* no connection yet */ 535 server->state = CONN_INVALID; /* no connection yet */
535 server->generation = 0; 536 server->generation = 0;
536 537
diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c
index 40e174db9872..feac46050619 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)
873 filp = fget(opt->fd); 873 filp = fget(opt->fd);
874 if (!filp) 874 if (!filp)
875 goto out; 875 goto out;
876 if (!smb_valid_socket(filp->f_dentry->d_inode)) 876 if (!smb_valid_socket(filp->f_path.dentry->d_inode))
877 goto out_putf; 877 goto out_putf;
878 878
879 server->sock_file = filp; 879 server->sock_file = filp;
880 server->conn_pid = current->pid; 880 server->conn_pid = get_pid(task_pid(current));
881 server->opt = *opt; 881 server->opt = *opt;
882 server->generation += 1; 882 server->generation += 1;
883 server->state = CONN_VALID; 883 server->state = CONN_VALID;
@@ -898,7 +898,7 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
898 /* 898 /*
899 * Store the server in sock user_data (Only used by sunrpc) 899 * Store the server in sock user_data (Only used by sunrpc)
900 */ 900 */
901 sk = SOCKET_I(filp->f_dentry->d_inode)->sk; 901 sk = SOCKET_I(filp->f_path.dentry->d_inode)->sk;
902 sk->sk_user_data = server; 902 sk->sk_user_data = server;
903 903
904 /* chain into the data_ready callback */ 904 /* chain into the data_ready callback */
@@ -971,8 +971,8 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
971 } 971 }
972 972
973 VERBOSE("protocol=%d, max_xmit=%d, pid=%d capabilities=0x%x\n", 973 VERBOSE("protocol=%d, max_xmit=%d, pid=%d capabilities=0x%x\n",
974 server->opt.protocol, server->opt.max_xmit, server->conn_pid, 974 server->opt.protocol, server->opt.max_xmit,
975 server->opt.capabilities); 975 pid_nr(server->conn_pid), server->opt.capabilities);
976 976
977 /* FIXME: this really should be done by smbmount. */ 977 /* FIXME: this really should be done by smbmount. */
978 if (server->opt.max_xmit > SMB_MAX_PACKET_SIZE) { 978 if (server->opt.max_xmit > SMB_MAX_PACKET_SIZE) {
@@ -1939,7 +1939,7 @@ static int
1939smb_proc_readdir_short(struct file *filp, void *dirent, filldir_t filldir, 1939smb_proc_readdir_short(struct file *filp, void *dirent, filldir_t filldir,
1940 struct smb_cache_control *ctl) 1940 struct smb_cache_control *ctl)
1941{ 1941{
1942 struct dentry *dir = filp->f_dentry; 1942 struct dentry *dir = filp->f_path.dentry;
1943 struct smb_sb_info *server = server_from_dentry(dir); 1943 struct smb_sb_info *server = server_from_dentry(dir);
1944 struct qstr qname; 1944 struct qstr qname;
1945 struct smb_fattr fattr; 1945 struct smb_fattr fattr;
@@ -2291,7 +2291,7 @@ static int
2291smb_proc_readdir_long(struct file *filp, void *dirent, filldir_t filldir, 2291smb_proc_readdir_long(struct file *filp, void *dirent, filldir_t filldir,
2292 struct smb_cache_control *ctl) 2292 struct smb_cache_control *ctl)
2293{ 2293{
2294 struct dentry *dir = filp->f_dentry; 2294 struct dentry *dir = filp->f_path.dentry;
2295 struct smb_sb_info *server = server_from_dentry(dir); 2295 struct smb_sb_info *server = server_from_dentry(dir);
2296 struct qstr qname; 2296 struct qstr qname;
2297 struct smb_fattr fattr; 2297 struct smb_fattr fattr;
@@ -2859,7 +2859,7 @@ static int
2859smb_proc_readdir_null(struct file *filp, void *dirent, filldir_t filldir, 2859smb_proc_readdir_null(struct file *filp, void *dirent, filldir_t filldir,
2860 struct smb_cache_control *ctl) 2860 struct smb_cache_control *ctl)
2861{ 2861{
2862 struct smb_sb_info *server = server_from_dentry(filp->f_dentry); 2862 struct smb_sb_info *server = server_from_dentry(filp->f_path.dentry);
2863 2863
2864 if (smb_proc_ops_wait(server) < 0) 2864 if (smb_proc_ops_wait(server) < 0)
2865 return -EIO; 2865 return -EIO;
diff --git a/fs/smbfs/smbiod.c b/fs/smbfs/smbiod.c
index e67540441288..89eaf31f1d46 100644
--- a/fs/smbfs/smbiod.c
+++ b/fs/smbfs/smbiod.c
@@ -152,7 +152,7 @@ int smbiod_retry(struct smb_sb_info *server)
152{ 152{
153 struct list_head *head; 153 struct list_head *head;
154 struct smb_request *req; 154 struct smb_request *req;
155 pid_t pid = server->conn_pid; 155 struct pid *pid = get_pid(server->conn_pid);
156 int result = 0; 156 int result = 0;
157 157
158 VERBOSE("state: %d\n", server->state); 158 VERBOSE("state: %d\n", server->state);
@@ -222,7 +222,7 @@ int smbiod_retry(struct smb_sb_info *server)
222 /* 222 /*
223 * Note: use the "priv" flag, as a user process may need to reconnect. 223 * Note: use the "priv" flag, as a user process may need to reconnect.
224 */ 224 */
225 result = kill_proc(pid, SIGUSR1, 1); 225 result = kill_pid(pid, SIGUSR1, 1);
226 if (result) { 226 if (result) {
227 /* FIXME: this is most likely fatal, umount? */ 227 /* FIXME: this is most likely fatal, umount? */
228 printk(KERN_ERR "smb_retry: signal failed [%d]\n", result); 228 printk(KERN_ERR "smb_retry: signal failed [%d]\n", result);
@@ -233,6 +233,7 @@ int smbiod_retry(struct smb_sb_info *server)
233 /* FIXME: The retried requests should perhaps get a "time boost". */ 233 /* FIXME: The retried requests should perhaps get a "time boost". */
234 234
235out: 235out:
236 put_pid(pid);
236 return result; 237 return result;
237} 238}
238 239
diff --git a/fs/smbfs/sock.c b/fs/smbfs/sock.c
index 6815b1b12b68..92ea6b2367d7 100644
--- a/fs/smbfs/sock.c
+++ b/fs/smbfs/sock.c
@@ -82,10 +82,10 @@ server_sock(struct smb_sb_info *server)
82 if (server && (file = server->sock_file)) 82 if (server && (file = server->sock_file))
83 { 83 {
84#ifdef SMBFS_PARANOIA 84#ifdef SMBFS_PARANOIA
85 if (!smb_valid_socket(file->f_dentry->d_inode)) 85 if (!smb_valid_socket(file->f_path.dentry->d_inode))
86 PARANOIA("bad socket!\n"); 86 PARANOIA("bad socket!\n");
87#endif 87#endif
88 return SOCKET_I(file->f_dentry->d_inode); 88 return SOCKET_I(file->f_path.dentry->d_inode);
89 } 89 }
90 return NULL; 90 return NULL;
91} 91}