fs: dcache rationalise dget variants
[deliverable/linux.git] / drivers / infiniband / hw / ipath / ipath_fs.c
index 12d5bf76302cc0eff403b5538607350f4e554e42..31ae1b108aea95e7ad769e49f7dd875f3a195d72 100644 (file)
@@ -277,18 +277,14 @@ static int remove_file(struct dentry *parent, char *name)
                goto bail;
        }
 
-       spin_lock(&dcache_lock);
        spin_lock(&tmp->d_lock);
        if (!(d_unhashed(tmp) && tmp->d_inode)) {
-               dget_locked(tmp);
+               dget_dlock(tmp);
                __d_drop(tmp);
                spin_unlock(&tmp->d_lock);
-               spin_unlock(&dcache_lock);
                simple_unlink(parent->d_inode, tmp);
-       } else {
+       } else
                spin_unlock(&tmp->d_lock);
-               spin_unlock(&dcache_lock);
-       }
 
        ret = 0;
 bail:
@@ -362,13 +358,13 @@ bail:
        return ret;
 }
 
-static int ipathfs_get_sb(struct file_system_type *fs_type, int flags,
-                       const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *ipathfs_mount(struct file_system_type *fs_type,
+                       int flags, const char *dev_name, void *data)
 {
-       int ret = get_sb_single(fs_type, flags, data,
-                                   ipathfs_fill_super, mnt);
-       if (ret >= 0)
-               ipath_super = mnt->mnt_sb;
+       struct dentry *ret;
+       ret = mount_single(fs_type, flags, data, ipathfs_fill_super);
+       if (!IS_ERR(ret))
+               ipath_super = ret->d_sb;
        return ret;
 }
 
@@ -411,7 +407,7 @@ bail:
 static struct file_system_type ipathfs_fs_type = {
        .owner =        THIS_MODULE,
        .name =         "ipathfs",
-       .get_sb =       ipathfs_get_sb,
+       .mount =        ipathfs_mount,
        .kill_sb =      ipathfs_kill_super,
 };
 
This page took 0.11337 seconds and 5 git commands to generate.