This brain fart is left over from some cleanup of these functions a _long_
time ago. We need to dput() the dentry, since we have an implicit count of
one left over from the create function.
Instead, we were dput() on the directory that it was in, which we didn't
have a matching dget() for.
static spinlock_t mount_lock = SPIN_LOCK_UNLOCKED;
static int mount_count = 0;
-
static int driverfs_readpage(struct file *file, struct page * page)
{
if (!PageUptodate(page)) {
if (dentry->d_inode &&
(dentry->d_parent->d_inode == dir->dentry->d_inode)) {
driverfs_unlink(dir->dentry->d_inode,dentry);
- dput(dir->dentry);
+ dput(dentry);
put_mount();
}
}
node = node->next;
driverfs_unlink(dentry->d_inode,d);
- dput(dentry);
+ dput(d);
put_mount();
}
up(&dentry->d_inode->i_sem);