X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fafs%2Fmntpt.c;fp=fs%2Fafs%2Fmntpt.c;h=31ee06590de549d833be410c742da32240187d22;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=2a53d511c6b1f9fafc8533b93b0869d91b444a98;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index 2a53d511c..31ee06590 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c @@ -32,7 +32,7 @@ static struct dentry *afs_mntpt_lookup(struct inode *dir, 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, }; @@ -63,6 +63,7 @@ unsigned long afs_mntpt_expiry_timeout = 20; int afs_mntpt_check_symlink(struct afs_vnode *vnode) { struct page *page; + filler_t *filler; size_t size; char *buf; int ret; @@ -70,7 +71,10 @@ int afs_mntpt_check_symlink(struct afs_vnode *vnode) _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; @@ -78,7 +82,7 @@ int afs_mntpt_check_symlink(struct afs_vnode *vnode) 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)) @@ -101,7 +105,7 @@ int afs_mntpt_check_symlink(struct afs_vnode *vnode) ret = 0; out_free: - kunmap_atomic(buf, KM_USER0); + kunmap(page); page_cache_release(page); out: _leave(" = %d", ret); @@ -156,6 +160,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) struct page *page = NULL; size_t size; char *buf, *devname = NULL, *options = NULL; + filler_t *filler; int ret; kenter("{%s}", mntpt->d_name.name); @@ -177,7 +182,9 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) 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; @@ -188,9 +195,9 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) 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; @@ -203,7 +210,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) /* 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); @@ -269,12 +276,12 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) */ 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() */