aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/direct.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 3de7c4b07968..737990dd4dfe 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -219,6 +219,7 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq)
219 } else 219 } else
220 wake_up(&dreq->wait); 220 wake_up(&dreq->wait);
221 221
222 iput(dreq->inode);
222 kref_put(&dreq->kref, nfs_direct_req_release); 223 kref_put(&dreq->kref, nfs_direct_req_release);
223} 224}
224 225
@@ -374,6 +375,7 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, unsigned long user_addr, size
374 375
375 dreq->pages = pages; 376 dreq->pages = pages;
376 dreq->npages = nr_pages; 377 dreq->npages = nr_pages;
378 igrab(inode);
377 dreq->inode = inode; 379 dreq->inode = inode;
378 dreq->filp = iocb->ki_filp; 380 dreq->filp = iocb->ki_filp;
379 if (!is_sync_kiocb(iocb)) 381 if (!is_sync_kiocb(iocb))
@@ -549,6 +551,7 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, siz
549 551
550 dreq->pages = pages; 552 dreq->pages = pages;
551 dreq->npages = nr_pages; 553 dreq->npages = nr_pages;
554 igrab(inode);
552 dreq->inode = inode; 555 dreq->inode = inode;
553 dreq->filp = iocb->ki_filp; 556 dreq->filp = iocb->ki_filp;
554 if (!is_sync_kiocb(iocb)) 557 if (!is_sync_kiocb(iocb))