aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pagelist.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/pagelist.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/pagelist.c')
-rw-r--r--fs/nfs/pagelist.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 345bb9b4765b..2dff469f04fe 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -67,7 +67,7 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode,
67 if (req != NULL) 67 if (req != NULL)
68 break; 68 break;
69 69
70 if (signalled() && (server->flags & NFS_MOUNT_INTR)) 70 if (fatal_signal_pending(current))
71 return ERR_PTR(-ERESTARTSYS); 71 return ERR_PTR(-ERESTARTSYS);
72 yield(); 72 yield();
73 } 73 }
@@ -175,11 +175,11 @@ void nfs_release_request(struct nfs_page *req)
175 kref_put(&req->wb_kref, nfs_free_request); 175 kref_put(&req->wb_kref, nfs_free_request);
176} 176}
177 177
178static int nfs_wait_bit_interruptible(void *word) 178static int nfs_wait_bit_killable(void *word)
179{ 179{
180 int ret = 0; 180 int ret = 0;
181 181
182 if (signal_pending(current)) 182 if (fatal_signal_pending(current))
183 ret = -ERESTARTSYS; 183 ret = -ERESTARTSYS;
184 else 184 else
185 schedule(); 185 schedule();
@@ -190,26 +190,18 @@ static int nfs_wait_bit_interruptible(void *word)
190 * nfs_wait_on_request - Wait for a request to complete. 190 * nfs_wait_on_request - Wait for a request to complete.
191 * @req: request to wait upon. 191 * @req: request to wait upon.
192 * 192 *
193 * Interruptible by signals only if mounted with intr flag. 193 * Interruptible by fatal signals only.
194 * The user is responsible for holding a count on the request. 194 * The user is responsible for holding a count on the request.
195 */ 195 */
196int 196int
197nfs_wait_on_request(struct nfs_page *req) 197nfs_wait_on_request(struct nfs_page *req)
198{ 198{
199 struct rpc_clnt *clnt = NFS_CLIENT(req->wb_context->path.dentry->d_inode);
200 sigset_t oldmask;
201 int ret = 0; 199 int ret = 0;
202 200
203 if (!test_bit(PG_BUSY, &req->wb_flags)) 201 if (!test_bit(PG_BUSY, &req->wb_flags))
204 goto out; 202 goto out;
205 /*
206 * Note: the call to rpc_clnt_sigmask() suffices to ensure that we
207 * are not interrupted if intr flag is not set
208 */
209 rpc_clnt_sigmask(clnt, &oldmask);
210 ret = out_of_line_wait_on_bit(&req->wb_flags, PG_BUSY, 203 ret = out_of_line_wait_on_bit(&req->wb_flags, PG_BUSY,
211 nfs_wait_bit_interruptible, TASK_INTERRUPTIBLE); 204 nfs_wait_bit_killable, TASK_KILLABLE);
212 rpc_clnt_sigunmask(clnt, &oldmask);
213out: 205out:
214 return ret; 206 return ret;
215} 207}