aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smbfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/smbfs')
-rw-r--r--fs/smbfs/Kconfig1
-rw-r--r--fs/smbfs/dir.c16
-rw-r--r--fs/smbfs/inode.c6
-rw-r--r--fs/smbfs/proc.c10
4 files changed, 14 insertions, 19 deletions
diff --git a/fs/smbfs/Kconfig b/fs/smbfs/Kconfig
index e668127c8b2..2bc24a8c403 100644
--- a/fs/smbfs/Kconfig
+++ b/fs/smbfs/Kconfig
@@ -1,5 +1,6 @@
1config SMB_FS 1config SMB_FS
2 tristate "SMB file system support (OBSOLETE, please use CIFS)" 2 tristate "SMB file system support (OBSOLETE, please use CIFS)"
3 depends on BKL # probably unfixable
3 depends on INET 4 depends on INET
4 select NLS 5 select NLS
5 help 6 help
diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c
index 00a70cab1f3..f678d421e54 100644
--- a/fs/smbfs/dir.c
+++ b/fs/smbfs/dir.c
@@ -406,21 +406,15 @@ void
406smb_renew_times(struct dentry * dentry) 406smb_renew_times(struct dentry * dentry)
407{ 407{
408 dget(dentry); 408 dget(dentry);
409 spin_lock(&dentry->d_lock); 409 dentry->d_time = jiffies;
410 for (;;) {
411 struct dentry *parent;
412 410
413 dentry->d_time = jiffies; 411 while (!IS_ROOT(dentry)) {
414 if (IS_ROOT(dentry)) 412 struct dentry *parent = dget_parent(dentry);
415 break;
416 parent = dentry->d_parent;
417 dget(parent);
418 spin_unlock(&dentry->d_lock);
419 dput(dentry); 413 dput(dentry);
420 dentry = parent; 414 dentry = parent;
421 spin_lock(&dentry->d_lock); 415
416 dentry->d_time = jiffies;
422 } 417 }
423 spin_unlock(&dentry->d_lock);
424 dput(dentry); 418 dput(dentry);
425} 419}
426 420
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 450c9194198..f6e9ee59757 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -229,7 +229,6 @@ smb_invalidate_inodes(struct smb_sb_info *server)
229{ 229{
230 VERBOSE("\n"); 230 VERBOSE("\n");
231 shrink_dcache_sb(SB_of(server)); 231 shrink_dcache_sb(SB_of(server));
232 invalidate_inodes(SB_of(server));
233} 232}
234 233
235/* 234/*
@@ -501,6 +500,8 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
501 void *mem; 500 void *mem;
502 static int warn_count; 501 static int warn_count;
503 502
503 lock_kernel();
504
504 if (warn_count < 5) { 505 if (warn_count < 5) {
505 warn_count++; 506 warn_count++;
506 printk(KERN_EMERG "smbfs is deprecated and will be removed" 507 printk(KERN_EMERG "smbfs is deprecated and will be removed"
@@ -621,6 +622,7 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
621 622
622 smb_new_dentry(sb->s_root); 623 smb_new_dentry(sb->s_root);
623 624
625 unlock_kernel();
624 return 0; 626 return 0;
625 627
626out_no_root: 628out_no_root:
@@ -643,9 +645,11 @@ out_wrong_data:
643out_no_data: 645out_no_data:
644 printk(KERN_ERR "smb_fill_super: missing data argument\n"); 646 printk(KERN_ERR "smb_fill_super: missing data argument\n");
645out_fail: 647out_fail:
648 unlock_kernel();
646 return -EINVAL; 649 return -EINVAL;
647out_no_server: 650out_no_server:
648 printk(KERN_ERR "smb_fill_super: cannot allocate struct smb_sb_info\n"); 651 printk(KERN_ERR "smb_fill_super: cannot allocate struct smb_sb_info\n");
652 unlock_kernel();
649 return -ENOMEM; 653 return -ENOMEM;
650} 654}
651 655
diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c
index 71c29b6670b..3dcf638d4d3 100644
--- a/fs/smbfs/proc.c
+++ b/fs/smbfs/proc.c
@@ -332,16 +332,15 @@ static int smb_build_path(struct smb_sb_info *server, unsigned char *buf,
332 * and store it in reversed order [see reverse_string()] 332 * and store it in reversed order [see reverse_string()]
333 */ 333 */
334 dget(entry); 334 dget(entry);
335 spin_lock(&entry->d_lock);
336 while (!IS_ROOT(entry)) { 335 while (!IS_ROOT(entry)) {
337 struct dentry *parent; 336 struct dentry *parent;
338 337
339 if (maxlen < (3<<unicode)) { 338 if (maxlen < (3<<unicode)) {
340 spin_unlock(&entry->d_lock);
341 dput(entry); 339 dput(entry);
342 return -ENAMETOOLONG; 340 return -ENAMETOOLONG;
343 } 341 }
344 342
343 spin_lock(&entry->d_lock);
345 len = server->ops->convert(path, maxlen-2, 344 len = server->ops->convert(path, maxlen-2,
346 entry->d_name.name, entry->d_name.len, 345 entry->d_name.name, entry->d_name.len,
347 server->local_nls, server->remote_nls); 346 server->local_nls, server->remote_nls);
@@ -359,15 +358,12 @@ static int smb_build_path(struct smb_sb_info *server, unsigned char *buf,
359 } 358 }
360 *path++ = '\\'; 359 *path++ = '\\';
361 maxlen -= len+1; 360 maxlen -= len+1;
362
363 parent = entry->d_parent;
364 dget(parent);
365 spin_unlock(&entry->d_lock); 361 spin_unlock(&entry->d_lock);
362
363 parent = dget_parent(entry);
366 dput(entry); 364 dput(entry);
367 entry = parent; 365 entry = parent;
368 spin_lock(&entry->d_lock);
369 } 366 }
370 spin_unlock(&entry->d_lock);
371 dput(entry); 367 dput(entry);
372 reverse_string(buf, path-buf); 368 reverse_string(buf, path-buf);
373 369