aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/dir.c4
-rw-r--r--fs/afs/mntpt.c11
-rw-r--r--fs/afs/super.c24
3 files changed, 16 insertions, 23 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index a6dff6a4f204..2fc99877cb0d 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -185,9 +185,7 @@ static struct page *afs_dir_get_page(struct inode *dir, unsigned long index)
185 185
186 _enter("{%lu},%lu", dir->i_ino, index); 186 _enter("{%lu},%lu", dir->i_ino, index);
187 187
188 page = read_cache_page(dir->i_mapping,index, 188 page = read_mapping_page(dir->i_mapping, index, NULL);
189 (filler_t *) dir->i_mapping->a_ops->readpage,
190 NULL);
191 if (!IS_ERR(page)) { 189 if (!IS_ERR(page)) {
192 wait_on_page_locked(page); 190 wait_on_page_locked(page);
193 kmap(page); 191 kmap(page);
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index 7b6dc03caf44..99785a79d043 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -63,7 +63,6 @@ unsigned long afs_mntpt_expiry_timeout = 20;
63int afs_mntpt_check_symlink(struct afs_vnode *vnode) 63int afs_mntpt_check_symlink(struct afs_vnode *vnode)
64{ 64{
65 struct page *page; 65 struct page *page;
66 filler_t *filler;
67 size_t size; 66 size_t size;
68 char *buf; 67 char *buf;
69 int ret; 68 int ret;
@@ -71,10 +70,7 @@ int afs_mntpt_check_symlink(struct afs_vnode *vnode)
71 _enter("{%u,%u}", vnode->fid.vnode, vnode->fid.unique); 70 _enter("{%u,%u}", vnode->fid.vnode, vnode->fid.unique);
72 71
73 /* read the contents of the symlink into the pagecache */ 72 /* read the contents of the symlink into the pagecache */
74 filler = (filler_t *) AFS_VNODE_TO_I(vnode)->i_mapping->a_ops->readpage; 73 page = read_mapping_page(AFS_VNODE_TO_I(vnode)->i_mapping, 0, NULL);
75
76 page = read_cache_page(AFS_VNODE_TO_I(vnode)->i_mapping, 0,
77 filler, NULL);
78 if (IS_ERR(page)) { 74 if (IS_ERR(page)) {
79 ret = PTR_ERR(page); 75 ret = PTR_ERR(page);
80 goto out; 76 goto out;
@@ -160,7 +156,6 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
160 struct page *page = NULL; 156 struct page *page = NULL;
161 size_t size; 157 size_t size;
162 char *buf, *devname = NULL, *options = NULL; 158 char *buf, *devname = NULL, *options = NULL;
163 filler_t *filler;
164 int ret; 159 int ret;
165 160
166 kenter("{%s}", mntpt->d_name.name); 161 kenter("{%s}", mntpt->d_name.name);
@@ -182,9 +177,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
182 goto error; 177 goto error;
183 178
184 /* read the contents of the AFS special symlink */ 179 /* read the contents of the AFS special symlink */
185 filler = (filler_t *)mntpt->d_inode->i_mapping->a_ops->readpage; 180 page = read_mapping_page(mntpt->d_inode->i_mapping, 0, NULL);
186
187 page = read_cache_page(mntpt->d_inode->i_mapping, 0, filler, NULL);
188 if (IS_ERR(page)) { 181 if (IS_ERR(page)) {
189 ret = PTR_ERR(page); 182 ret = PTR_ERR(page);
190 goto error; 183 goto error;
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 93a7821db0d7..67d1f5c819ec 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -38,9 +38,9 @@ struct afs_mount_params {
38static void afs_i_init_once(void *foo, kmem_cache_t *cachep, 38static void afs_i_init_once(void *foo, kmem_cache_t *cachep,
39 unsigned long flags); 39 unsigned long flags);
40 40
41static struct super_block *afs_get_sb(struct file_system_type *fs_type, 41static int afs_get_sb(struct file_system_type *fs_type,
42 int flags, const char *dev_name, 42 int flags, const char *dev_name,
43 void *data); 43 void *data, struct vfsmount *mnt);
44 44
45static struct inode *afs_alloc_inode(struct super_block *sb); 45static struct inode *afs_alloc_inode(struct super_block *sb);
46 46
@@ -294,10 +294,11 @@ static int afs_fill_super(struct super_block *sb, void *data, int silent)
294 * get an AFS superblock 294 * get an AFS superblock
295 * - TODO: don't use get_sb_nodev(), but rather call sget() directly 295 * - TODO: don't use get_sb_nodev(), but rather call sget() directly
296 */ 296 */
297static struct super_block *afs_get_sb(struct file_system_type *fs_type, 297static int afs_get_sb(struct file_system_type *fs_type,
298 int flags, 298 int flags,
299 const char *dev_name, 299 const char *dev_name,
300 void *options) 300 void *options,
301 struct vfsmount *mnt)
301{ 302{
302 struct afs_mount_params params; 303 struct afs_mount_params params;
303 struct super_block *sb; 304 struct super_block *sb;
@@ -311,7 +312,7 @@ static struct super_block *afs_get_sb(struct file_system_type *fs_type,
311 ret = afscm_start(); 312 ret = afscm_start();
312 if (ret < 0) { 313 if (ret < 0) {
313 _leave(" = %d", ret); 314 _leave(" = %d", ret);
314 return ERR_PTR(ret); 315 return ret;
315 } 316 }
316 317
317 /* parse the options */ 318 /* parse the options */
@@ -348,18 +349,19 @@ static struct super_block *afs_get_sb(struct file_system_type *fs_type,
348 goto error; 349 goto error;
349 } 350 }
350 sb->s_flags |= MS_ACTIVE; 351 sb->s_flags |= MS_ACTIVE;
352 simple_set_mnt(mnt, sb);
351 353
352 afs_put_volume(params.volume); 354 afs_put_volume(params.volume);
353 afs_put_cell(params.default_cell); 355 afs_put_cell(params.default_cell);
354 _leave(" = %p", sb); 356 _leave(" = 0 [%p]", 0, sb);
355 return sb; 357 return 0;
356 358
357 error: 359 error:
358 afs_put_volume(params.volume); 360 afs_put_volume(params.volume);
359 afs_put_cell(params.default_cell); 361 afs_put_cell(params.default_cell);
360 afscm_stop(); 362 afscm_stop();
361 _leave(" = %d", ret); 363 _leave(" = %d", ret);
362 return ERR_PTR(ret); 364 return ret;
363} /* end afs_get_sb() */ 365} /* end afs_get_sb() */
364 366
365/*****************************************************************************/ 367/*****************************************************************************/