aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-01-12 16:45:19 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-12 20:03:42 -0500
commita129880dafaa3c80eb0bae714da38088ccc2ce21 (patch)
tree4fdde6bdd2d057964fcc84038041dd3ac87e7c87
parentd463a0c4b53a8fab505fd9aa3a1a04cb9f411b78 (diff)
switch affs
either d_op instance would work for root, actually... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/affs/affs.h1
-rw-r--r--fs/affs/namei.c3
-rw-r--r--fs/affs/super.c6
3 files changed, 7 insertions, 3 deletions
diff --git a/fs/affs/affs.h b/fs/affs/affs.h
index a8cbdeb34025..0e95f73a7023 100644
--- a/fs/affs/affs.h
+++ b/fs/affs/affs.h
@@ -201,6 +201,7 @@ extern const struct address_space_operations affs_aops;
201extern const struct address_space_operations affs_aops_ofs; 201extern const struct address_space_operations affs_aops_ofs;
202 202
203extern const struct dentry_operations affs_dentry_operations; 203extern const struct dentry_operations affs_dentry_operations;
204extern const struct dentry_operations affs_intl_dentry_operations;
204 205
205static inline void 206static inline void
206affs_set_blocksize(struct super_block *sb, int size) 207affs_set_blocksize(struct super_block *sb, int size)
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index 944a4042fb65..e3e9efc1fdd8 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -32,7 +32,7 @@ const struct dentry_operations affs_dentry_operations = {
32 .d_compare = affs_compare_dentry, 32 .d_compare = affs_compare_dentry,
33}; 33};
34 34
35static const struct dentry_operations affs_intl_dentry_operations = { 35const struct dentry_operations affs_intl_dentry_operations = {
36 .d_hash = affs_intl_hash_dentry, 36 .d_hash = affs_intl_hash_dentry,
37 .d_compare = affs_intl_compare_dentry, 37 .d_compare = affs_intl_compare_dentry,
38}; 38};
@@ -240,7 +240,6 @@ affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
240 if (IS_ERR(inode)) 240 if (IS_ERR(inode))
241 return ERR_CAST(inode); 241 return ERR_CAST(inode);
242 } 242 }
243 d_set_d_op(dentry, AFFS_SB(sb)->s_flags & SF_INTL ? &affs_intl_dentry_operations : &affs_dentry_operations);
244 d_add(dentry, inode); 243 d_add(dentry, inode);
245 return NULL; 244 return NULL;
246} 245}
diff --git a/fs/affs/super.c b/fs/affs/super.c
index d39081bbe7ce..b31507d0f9b9 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -477,12 +477,16 @@ got_root:
477 goto out_error_noinode; 477 goto out_error_noinode;
478 } 478 }
479 479
480 if (AFFS_SB(sb)->s_flags & SF_INTL)
481 sb->s_d_op = &affs_intl_dentry_operations;
482 else
483 sb->s_d_op = &affs_dentry_operations;
484
480 sb->s_root = d_alloc_root(root_inode); 485 sb->s_root = d_alloc_root(root_inode);
481 if (!sb->s_root) { 486 if (!sb->s_root) {
482 printk(KERN_ERR "AFFS: Get root inode failed\n"); 487 printk(KERN_ERR "AFFS: Get root inode failed\n");
483 goto out_error; 488 goto out_error;
484 } 489 }
485 d_set_d_op(sb->s_root, &affs_dentry_operations);
486 490
487 pr_debug("AFFS: s_flags=%lX\n",sb->s_flags); 491 pr_debug("AFFS: s_flags=%lX\n",sb->s_flags);
488 return 0; 492 return 0;