diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-12-18 10:44:00 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-12 20:02:43 -0500 |
commit | 3d23985d6cfa7908e46fd0c62a2ee84faffe4d8b (patch) | |
tree | 5561a4f3eb3ef265de2b6d224194ff58b713fe0a /fs/fat/namei_msdos.c | |
parent | 6cc9c1d2c1414ef67f465462aa96a5d1fed12f5d (diff) | |
download | op-kernel-dev-3d23985d6cfa7908e46fd0c62a2ee84faffe4d8b.zip op-kernel-dev-3d23985d6cfa7908e46fd0c62a2ee84faffe4d8b.tar.gz |
switch fat to ->s_d_op, close exportfs races there
don't bother with lock_super() in fat_fill_super() callers, while
we are at it - there won't be any concurrency anyway.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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 35ffe43..7114990 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, } out: unlock_super(sb); - d_set_d_op(dentry, &msdos_dentry_operations); - dentry = d_splice_alias(inode, dentry); - if (dentry) - d_set_d_op(dentry, &msdos_dentry_operations); - return dentry; + return d_splice_alias(inode, dentry); error: unlock_super(sb); @@ -661,21 +657,16 @@ static const struct inode_operations msdos_dir_inode_operations = { .getattr = fat_getattr, }; -static int msdos_fill_super(struct super_block *sb, void *data, int silent) +static void setup(struct super_block *sb) { - int res; - - lock_super(sb); - res = fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, 0); - if (res) { - unlock_super(sb); - return res; - } - + sb->s_d_op = &msdos_dentry_operations; sb->s_flags |= MS_NOATIME; - d_set_d_op(sb->s_root, &msdos_dentry_operations); - unlock_super(sb); - return 0; +} + +static int msdos_fill_super(struct super_block *sb, void *data, int silent) +{ + return fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, + 0, setup); } static struct dentry *msdos_mount(struct file_system_type *fs_type, |