static int afs_mntpt_open(struct inode *inode, struct file *file);
static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd);
-const struct file_operations afs_mntpt_file_operations = {
+struct file_operations afs_mntpt_file_operations = {
.open = afs_mntpt_open,
};
int afs_mntpt_check_symlink(struct afs_vnode *vnode)
{
struct page *page;
+ filler_t *filler;
size_t size;
char *buf;
int ret;
_enter("{%u,%u}", vnode->fid.vnode, vnode->fid.unique);
/* read the contents of the symlink into the pagecache */
- page = read_mapping_page(AFS_VNODE_TO_I(vnode)->i_mapping, 0, NULL);
+ filler = (filler_t *) AFS_VNODE_TO_I(vnode)->i_mapping->a_ops->readpage;
+
+ page = read_cache_page(AFS_VNODE_TO_I(vnode)->i_mapping, 0,
+ filler, NULL);
if (IS_ERR(page)) {
ret = PTR_ERR(page);
goto out;
ret = -EIO;
wait_on_page_locked(page);
- buf = kmap_atomic(page, KM_USER0);
+ buf = kmap(page);
if (!PageUptodate(page))
goto out_free;
if (PageError(page))
ret = 0;
out_free:
- kunmap_atomic(buf, KM_USER0);
+ kunmap(page);
page_cache_release(page);
out:
_leave(" = %d", ret);
struct page *page = NULL;
size_t size;
char *buf, *devname = NULL, *options = NULL;
+ filler_t *filler;
int ret;
kenter("{%s}", mntpt->d_name.name);
goto error;
/* read the contents of the AFS special symlink */
- page = read_mapping_page(mntpt->d_inode->i_mapping, 0, NULL);
+ filler = (filler_t *)mntpt->d_inode->i_mapping->a_ops->readpage;
+
+ page = read_cache_page(mntpt->d_inode->i_mapping, 0, filler, NULL);
if (IS_ERR(page)) {
ret = PTR_ERR(page);
goto error;
if (!PageUptodate(page) || PageError(page))
goto error;
- buf = kmap_atomic(page, KM_USER0);
+ buf = kmap(page);
memcpy(devname, buf, size);
- kunmap_atomic(buf, KM_USER0);
+ kunmap(page);
page_cache_release(page);
page = NULL;
/* try and do the mount */
kdebug("--- attempting mount %s -o %s ---", devname, options);
- mnt = vfs_kern_mount(&afs_fs_type, 0, devname, options);
+ mnt = do_kern_mount("afs", 0, devname, options);
kdebug("--- mount result %p ---", mnt);
free_page((unsigned long) devname);
*/
static void afs_mntpt_expiry_timed_out(struct afs_timer *timer)
{
-// kenter("");
+ kenter("");
mark_mounts_for_expiry(&afs_vfsmounts);
afs_kafstimod_add_timer(&afs_mntpt_expiry_timer,
afs_mntpt_expiry_timeout * HZ);
-// kleave("");
+ kleave("");
} /* end afs_mntpt_expiry_timed_out() */