mntpt.c (ffee72d4681c8777918268a96aef42bdeb6c367b) mntpt.c (f6d335c08df48b318187a087c9c38ba3d416e115)
1/* mountpoint management
2 *
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 35 unchanged lines hidden (view full) ---

44static unsigned long afs_mntpt_expiry_timeout = 10 * 60;
45
46/*
47 * check a symbolic link to see whether it actually encodes a mountpoint
48 * - sets the AFS_VNODE_MOUNTPOINT flag on the vnode appropriately
49 */
50int afs_mntpt_check_symlink(struct afs_vnode *vnode, struct key *key)
51{
1/* mountpoint management
2 *
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 35 unchanged lines hidden (view full) ---

44static unsigned long afs_mntpt_expiry_timeout = 10 * 60;
45
46/*
47 * check a symbolic link to see whether it actually encodes a mountpoint
48 * - sets the AFS_VNODE_MOUNTPOINT flag on the vnode appropriately
49 */
50int afs_mntpt_check_symlink(struct afs_vnode *vnode, struct key *key)
51{
52 struct file file = {
53 .private_data = key,
54 };
55 struct page *page;
56 size_t size;
57 char *buf;
58 int ret;
59
60 _enter("{%x:%u,%u}",
61 vnode->fid.vid, vnode->fid.vnode, vnode->fid.unique);
62
63 /* read the contents of the symlink into the pagecache */
52 struct page *page;
53 size_t size;
54 char *buf;
55 int ret;
56
57 _enter("{%x:%u,%u}",
58 vnode->fid.vid, vnode->fid.vnode, vnode->fid.unique);
59
60 /* read the contents of the symlink into the pagecache */
64 page = read_mapping_page(AFS_VNODE_TO_I(vnode)->i_mapping, 0, &file);
61 page = read_cache_page(AFS_VNODE_TO_I(vnode)->i_mapping, 0,
62 afs_page_filler, key);
65 if (IS_ERR(page)) {
66 ret = PTR_ERR(page);
67 goto out;
68 }
69
70 ret = -EIO;
71 if (PageError(page))
72 goto out_free;

--- 212 unchanged lines hidden ---
63 if (IS_ERR(page)) {
64 ret = PTR_ERR(page);
65 goto out;
66 }
67
68 ret = -EIO;
69 if (PageError(page))
70 goto out_free;

--- 212 unchanged lines hidden ---