diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 19:10:39 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 19:10:39 -0400 |
commit | 739cdbf1d8f0739b80035b80d69d871e33749b86 (patch) | |
tree | 15134df8723ab7d7a5524c99070f02d5739bad0d /mm | |
parent | 83bbecc905b3431c60fe282830e09aaaab97b26a (diff) | |
parent | 8f3d17fb7bcb7c255197d11469fb5e9695c9d2f4 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'mm')
-rw-r--r-- | mm/shmem.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index e64fa726a79..5a81b1ee4f7 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1773,32 +1773,27 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s return 0; } -static int shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd) +static void *shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd) { nd_set_link(nd, (char *)SHMEM_I(dentry->d_inode)); - return 0; + return NULL; } -static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd) +static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd) { struct page *page = NULL; int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL); nd_set_link(nd, res ? ERR_PTR(res) : kmap(page)); - return 0; + return page; } -static void shmem_put_link(struct dentry *dentry, struct nameidata *nd) +static void shmem_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) { if (!IS_ERR(nd_get_link(nd))) { - struct page *page; - - page = find_get_page(dentry->d_inode->i_mapping, 0); - if (!page) - BUG(); + struct page *page = cookie; kunmap(page); mark_page_accessed(page); page_cache_release(page); - page_cache_release(page); } } |