Introduce path_put()
[pandora-kernel.git] / drivers / mtd / mtdsuper.c
index 9b430f2..28cc678 100644 (file)
@@ -184,26 +184,26 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags,
        ret = path_lookup(dev_name, LOOKUP_FOLLOW, &nd);
 
        DEBUG(1, "MTDSB: path_lookup() returned %d, inode %p\n",
-             ret, nd.dentry ? nd.dentry->d_inode : NULL);
+             ret, nd.path.dentry ? nd.path.dentry->d_inode : NULL);
 
        if (ret)
                return ret;
 
        ret = -EINVAL;
 
-       if (!S_ISBLK(nd.dentry->d_inode->i_mode))
+       if (!S_ISBLK(nd.path.dentry->d_inode->i_mode))
                goto out;
 
-       if (nd.mnt->mnt_flags & MNT_NODEV) {
+       if (nd.path.mnt->mnt_flags & MNT_NODEV) {
                ret = -EACCES;
                goto out;
        }
 
-       if (imajor(nd.dentry->d_inode) != MTD_BLOCK_MAJOR)
+       if (imajor(nd.path.dentry->d_inode) != MTD_BLOCK_MAJOR)
                goto not_an_MTD_device;
 
-       mtdnr = iminor(nd.dentry->d_inode);
-       path_release(&nd);
+       mtdnr = iminor(nd.path.dentry->d_inode);
+       path_put(&nd.path);
 
        return get_sb_mtd_nr(fs_type, flags, dev_name, data, mtdnr, fill_super,
                             mnt);
@@ -214,7 +214,7 @@ not_an_MTD_device:
                       "MTD: Attempt to mount non-MTD device \"%s\"\n",
                       dev_name);
 out:
-       path_release(&nd);
+       path_put(&nd.path);
        return ret;
 
 }