diff options
Diffstat (limited to 'fs/fat/namei_msdos.c')
-rw-r--r-- | fs/fat/namei_msdos.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index 35ffe43afa4b..711499040eb6 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c | |||
@@ -227,11 +227,7 @@ static struct dentry *msdos_lookup(struct inode *dir, struct dentry *dentry, | |||
227 | } | 227 | } |
228 | out: | 228 | out: |
229 | unlock_super(sb); | 229 | unlock_super(sb); |
230 | d_set_d_op(dentry, &msdos_dentry_operations); | 230 | return d_splice_alias(inode, dentry); |
231 | dentry = d_splice_alias(inode, dentry); | ||
232 | if (dentry) | ||
233 | d_set_d_op(dentry, &msdos_dentry_operations); | ||
234 | return dentry; | ||
235 | 231 | ||
236 | error: | 232 | error: |
237 | unlock_super(sb); | 233 | unlock_super(sb); |
@@ -661,21 +657,16 @@ static const struct inode_operations msdos_dir_inode_operations = { | |||
661 | .getattr = fat_getattr, | 657 | .getattr = fat_getattr, |
662 | }; | 658 | }; |
663 | 659 | ||
664 | static int msdos_fill_super(struct super_block *sb, void *data, int silent) | 660 | static void setup(struct super_block *sb) |
665 | { | 661 | { |
666 | int res; | 662 | sb->s_d_op = &msdos_dentry_operations; |
667 | |||
668 | lock_super(sb); | ||
669 | res = fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, 0); | ||
670 | if (res) { | ||
671 | unlock_super(sb); | ||
672 | return res; | ||
673 | } | ||
674 | |||
675 | sb->s_flags |= MS_NOATIME; | 663 | sb->s_flags |= MS_NOATIME; |
676 | d_set_d_op(sb->s_root, &msdos_dentry_operations); | 664 | } |
677 | unlock_super(sb); | 665 | |
678 | return 0; | 666 | static int msdos_fill_super(struct super_block *sb, void *data, int silent) |
667 | { | ||
668 | return fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, | ||
669 | 0, setup); | ||
679 | } | 670 | } |
680 | 671 | ||
681 | static struct dentry *msdos_mount(struct file_system_type *fs_type, | 672 | static struct dentry *msdos_mount(struct file_system_type *fs_type, |