summaryrefslogtreecommitdiffstats
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-09 19:19:15 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-09 21:17:34 +0200
commit7ad84aa9448571678c243f0c5ef383fbe5b50f4f (patch)
tree7d2baea4ff52fe62b23bf8adbb81a824ee768938 /fs/nfs/direct.c
parentNFS: nfs_set_page_writeback no longer needs to reference the page (diff)
downloadlinux-7ad84aa9448571678c243f0c5ef383fbe5b50f4f.tar.xz
linux-7ad84aa9448571678c243f0c5ef383fbe5b50f4f.zip
NFS: Clean up - simplify nfs_lock_request()
We only have two places where we need to grab a reference when trying to lock the nfs_page. We're better off making that explicit. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Fred Isaman <iisaman@netapp.com>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r--fs/nfs/direct.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 257d0091148b..465ea84a2874 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -657,6 +657,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *d
break;
}
nfs_lock_request(req);
+ kref_get(&req->wb_kref);
req->wb_index = pos >> PAGE_SHIFT;
req->wb_offset = pos & ~PAGE_MASK;
if (!nfs_pageio_add_request(desc, req)) {