mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
[linux-2.6-block.git] / fs / nfs / dir.c
index 9cce67043f92a589193625ca3005d0b1e0f4e36b..adef506c57865b972c1ea69efa2f2e1e6b045fb0 100644 (file)
@@ -707,7 +707,7 @@ void cache_page_release(nfs_readdir_descriptor_t *desc)
 {
        if (!desc->page->mapping)
                nfs_readdir_clear_array(desc->page);
-       page_cache_release(desc->page);
+       put_page(desc->page);
        desc->page = NULL;
 }
 
@@ -1360,19 +1360,15 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in
        dfprintk(VFS, "NFS: lookup(%pd2)\n", dentry);
        nfs_inc_stats(dir, NFSIOS_VFSLOOKUP);
 
-       res = ERR_PTR(-ENAMETOOLONG);
-       if (dentry->d_name.len > NFS_SERVER(dir)->namelen)
-               goto out;
+       if (unlikely(dentry->d_name.len > NFS_SERVER(dir)->namelen))
+               return ERR_PTR(-ENAMETOOLONG);
 
        /*
         * If we're doing an exclusive create, optimize away the lookup
         * but don't hash the dentry.
         */
-       if (nfs_is_exclusive_create(dir, flags)) {
-               d_instantiate(dentry, NULL);
-               res = NULL;
-               goto out;
-       }
+       if (nfs_is_exclusive_create(dir, flags))
+               return NULL;
 
        res = ERR_PTR(-ENOMEM);
        fhandle = nfs_alloc_fhandle();
@@ -1927,7 +1923,7 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
                 * add_to_page_cache_lru() grabs an extra page refcount.
                 * Drop it here to avoid leaking this page later.
                 */
-               page_cache_release(page);
+               put_page(page);
        } else
                __free_page(page);