2.6.32.28 update
/fs/nfs/file.c
blob:6fed6ccbf68949eae40ece1c2506694c770bf729 -> blob:393d40fd7eb9d8fd5dd5d784fc94b741d94e3912
--- fs/nfs/file.c
+++ fs/nfs/file.c
@@ -27,8 +27,6 @@
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/aio.h>
-#include <linux/gfp.h>
-#include <linux/swap.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -486,19 +484,10 @@ static void nfs_invalidate_page(struct p
*/
static int nfs_release_page(struct page *page, gfp_t gfp)
{
- struct address_space *mapping = page->mapping;
-
dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
- /* Only do I/O if gfp is a superset of GFP_KERNEL */
- if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL) {
- int how = FLUSH_SYNC;
-
- /* Don't let kswapd deadlock waiting for OOM RPC calls */
- if (current_is_kswapd())
- how = 0;
- nfs_commit_inode(mapping->host, how);
- }
+ if (gfp & __GFP_WAIT)
+ nfs_wb_page(page->mapping->host, page);
/* If PagePrivate() is set, then the page is not freeable */
if (PagePrivate(page))
return 0;
@@ -680,7 +669,6 @@ static int do_getlk(struct file *filp, i
{
struct inode *inode = filp->f_mapping->host;
int status = 0;
- unsigned int saved_type = fl->fl_type;
/* Try local locking first */
posix_test_lock(filp, fl);
@@ -688,7 +676,6 @@ static int do_getlk(struct file *filp, i
/* found a conflict */
goto out;
}
- fl->fl_type = saved_type;
if (nfs_have_delegation(inode, FMODE_READ))
goto out_noconflict;