aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-01-12 16:19:20 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-12 20:02:47 -0500
commitb5c7d208ca48e7769aa38731665283790de49840 (patch)
treea41286958f47bbc7f74d0a0c88768c48700e5d8d
parent43d344d7722f9b914849ba0014342111a9a0b03e (diff)
convert smbfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--drivers/staging/smbfs/dir.c13
-rw-r--r--drivers/staging/smbfs/inode.c4
-rw-r--r--drivers/staging/smbfs/proto.h2
3 files changed, 6 insertions, 13 deletions
diff --git a/drivers/staging/smbfs/dir.c b/drivers/staging/smbfs/dir.c
index dd612f50749f..87a3a9bd5842 100644
--- a/drivers/staging/smbfs/dir.c
+++ b/drivers/staging/smbfs/dir.c
@@ -403,12 +403,6 @@ smb_delete_dentry(const struct dentry *dentry)
403void 403void
404smb_new_dentry(struct dentry *dentry) 404smb_new_dentry(struct dentry *dentry)
405{ 405{
406 struct smb_sb_info *server = server_from_dentry(dentry);
407
408 if (server->mnt->flags & SMB_MOUNT_CASE)
409 d_set_d_op(dentry, &smbfs_dentry_operations_case);
410 else
411 d_set_d_op(dentry, &smbfs_dentry_operations);
412 dentry->d_time = jiffies; 406 dentry->d_time = jiffies;
413} 407}
414 408
@@ -440,7 +434,6 @@ smb_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
440 struct smb_fattr finfo; 434 struct smb_fattr finfo;
441 struct inode *inode; 435 struct inode *inode;
442 int error; 436 int error;
443 struct smb_sb_info *server;
444 437
445 error = -ENAMETOOLONG; 438 error = -ENAMETOOLONG;
446 if (dentry->d_name.len > SMB_MAXNAMELEN) 439 if (dentry->d_name.len > SMB_MAXNAMELEN)
@@ -468,12 +461,6 @@ smb_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
468 inode = smb_iget(dir->i_sb, &finfo); 461 inode = smb_iget(dir->i_sb, &finfo);
469 if (inode) { 462 if (inode) {
470 add_entry: 463 add_entry:
471 server = server_from_dentry(dentry);
472 if (server->mnt->flags & SMB_MOUNT_CASE)
473 d_set_d_op(dentry, &smbfs_dentry_operations_case);
474 else
475 d_set_d_op(dentry, &smbfs_dentry_operations);
476
477 d_add(dentry, inode); 464 d_add(dentry, inode);
478 smb_renew_times(dentry); 465 smb_renew_times(dentry);
479 error = 0; 466 error = 0;
diff --git a/drivers/staging/smbfs/inode.c b/drivers/staging/smbfs/inode.c
index 244319dc9702..0778589d9e9e 100644
--- a/drivers/staging/smbfs/inode.c
+++ b/drivers/staging/smbfs/inode.c
@@ -614,6 +614,10 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
614 printk(KERN_ERR "smbfs: failed to start smbiod\n"); 614 printk(KERN_ERR "smbfs: failed to start smbiod\n");
615 goto out_no_smbiod; 615 goto out_no_smbiod;
616 } 616 }
617 if (server->mnt->flags & SMB_MOUNT_CASE)
618 sb->s_d_op = &smbfs_dentry_operations_case;
619 else
620 sb->s_d_op = &smbfs_dentry_operations;
617 621
618 /* 622 /*
619 * Keep the super block locked while we get the root inode. 623 * Keep the super block locked while we get the root inode.
diff --git a/drivers/staging/smbfs/proto.h b/drivers/staging/smbfs/proto.h
index 05939a6f43e6..3883cb16a3f6 100644
--- a/drivers/staging/smbfs/proto.h
+++ b/drivers/staging/smbfs/proto.h
@@ -38,6 +38,8 @@ extern void smb_install_null_ops(struct smb_ops *ops);
38extern const struct file_operations smb_dir_operations; 38extern const struct file_operations smb_dir_operations;
39extern const struct inode_operations smb_dir_inode_operations; 39extern const struct inode_operations smb_dir_inode_operations;
40extern const struct inode_operations smb_dir_inode_operations_unix; 40extern const struct inode_operations smb_dir_inode_operations_unix;
41extern const struct dentry_operations smbfs_dentry_operations_case;
42extern const struct dentry_operations smbfs_dentry_operations;
41extern void smb_new_dentry(struct dentry *dentry); 43extern void smb_new_dentry(struct dentry *dentry);
42extern void smb_renew_times(struct dentry *dentry); 44extern void smb_renew_times(struct dentry *dentry);
43/* cache.c */ 45/* cache.c */