linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / nfs / symlink.c
index 600bbe6..18dc95b 100644 (file)
@@ -52,7 +52,7 @@ static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct inode *inode = dentry->d_inode;
        struct page *page;
-       void *err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping));
+       void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode));
        if (err)
                goto read_failed;
        page = read_cache_page(&inode->i_data, 0,
@@ -75,13 +75,22 @@ read_failed:
        return NULL;
 }
 
+static void nfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
+{
+       if (cookie) {
+               struct page *page = cookie;
+               kunmap(page);
+               page_cache_release(page);
+       }
+}
+
 /*
  * symlinks can't do much...
  */
 struct inode_operations nfs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = nfs_follow_link,
-       .put_link       = page_put_link,
+       .put_link       = nfs_put_link,
        .getattr        = nfs_getattr,
        .setattr        = nfs_setattr,
 };