aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-12-06 16:24:39 -0500
committerMatthew Wilcox <willy@linux.intel.com>2007-12-06 17:40:25 -0500
commit150030b78a454ba50d5e267b0dcf01b162809192 (patch)
tree4de766e7abbfd73a052f14f8efd3a26eb7b59d87 /fs/nfs/direct.c
parent009e577e079656d51d0fe9b15e61e41b00816c29 (diff)
NFS: Switch from intr mount option to TASK_KILLABLE
By using the TASK_KILLABLE infrastructure, we can get rid of the 'intr' mount option. We have to use _killable everywhere instead of _interruptible as we get rid of rpc_clnt_sigmask/sigunmask. Signed-off-by: Liam R. Howlett <howlett@gmail.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r--fs/nfs/direct.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 5e8d82f6666b..7b994b2fa593 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -193,7 +193,7 @@ static ssize_t nfs_direct_wait(struct nfs_direct_req *dreq)
193 if (dreq->iocb) 193 if (dreq->iocb)
194 goto out; 194 goto out;
195 195
196 result = wait_for_completion_interruptible(&dreq->completion); 196 result = wait_for_completion_killable(&dreq->completion);
197 197
198 if (!result) 198 if (!result)
199 result = dreq->error; 199 result = dreq->error;
@@ -391,9 +391,7 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
391 unsigned long nr_segs, loff_t pos) 391 unsigned long nr_segs, loff_t pos)
392{ 392{
393 ssize_t result = 0; 393 ssize_t result = 0;
394 sigset_t oldset;
395 struct inode *inode = iocb->ki_filp->f_mapping->host; 394 struct inode *inode = iocb->ki_filp->f_mapping->host;
396 struct rpc_clnt *clnt = NFS_CLIENT(inode);
397 struct nfs_direct_req *dreq; 395 struct nfs_direct_req *dreq;
398 396
399 dreq = nfs_direct_req_alloc(); 397 dreq = nfs_direct_req_alloc();
@@ -405,11 +403,9 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, const struct iovec *iov,
405 if (!is_sync_kiocb(iocb)) 403 if (!is_sync_kiocb(iocb))
406 dreq->iocb = iocb; 404 dreq->iocb = iocb;
407 405
408 rpc_clnt_sigmask(clnt, &oldset);
409 result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos); 406 result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos);
410 if (!result) 407 if (!result)
411 result = nfs_direct_wait(dreq); 408 result = nfs_direct_wait(dreq);
412 rpc_clnt_sigunmask(clnt, &oldset);
413 nfs_direct_req_release(dreq); 409 nfs_direct_req_release(dreq);
414 410
415 return result; 411 return result;
@@ -767,9 +763,7 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
767 size_t count) 763 size_t count)
768{ 764{
769 ssize_t result = 0; 765 ssize_t result = 0;
770 sigset_t oldset;
771 struct inode *inode = iocb->ki_filp->f_mapping->host; 766 struct inode *inode = iocb->ki_filp->f_mapping->host;
772 struct rpc_clnt *clnt = NFS_CLIENT(inode);
773 struct nfs_direct_req *dreq; 767 struct nfs_direct_req *dreq;
774 size_t wsize = NFS_SERVER(inode)->wsize; 768 size_t wsize = NFS_SERVER(inode)->wsize;
775 int sync = 0; 769 int sync = 0;
@@ -787,11 +781,9 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
787 if (!is_sync_kiocb(iocb)) 781 if (!is_sync_kiocb(iocb))
788 dreq->iocb = iocb; 782 dreq->iocb = iocb;
789 783
790 rpc_clnt_sigmask(clnt, &oldset);
791 result = nfs_direct_write_schedule_iovec(dreq, iov, nr_segs, pos, sync); 784 result = nfs_direct_write_schedule_iovec(dreq, iov, nr_segs, pos, sync);
792 if (!result) 785 if (!result)
793 result = nfs_direct_wait(dreq); 786 result = nfs_direct_wait(dreq);
794 rpc_clnt_sigunmask(clnt, &oldset);
795 nfs_direct_req_release(dreq); 787 nfs_direct_req_release(dreq);
796 788
797 return result; 789 return result;