diff options
Diffstat (limited to 'fs/nfs/pagelist.c')
| -rw-r--r-- | fs/nfs/pagelist.c | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 311a79681e2..e56e846e9d2 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -102,6 +102,7 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode,  		   unsigned int offset, unsigned int count)  {  	struct nfs_page		*req; +	struct nfs_lock_context *l_ctx;  	/* try to allocate the request struct */  	req = nfs_page_alloc(); @@ -109,11 +110,12 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode,  		return ERR_PTR(-ENOMEM);  	/* get lock context early so we can deal with alloc failures */ -	req->wb_lock_context = nfs_get_lock_context(ctx); -	if (req->wb_lock_context == NULL) { +	l_ctx = nfs_get_lock_context(ctx); +	if (IS_ERR(l_ctx)) {  		nfs_page_free(req); -		return ERR_PTR(-ENOMEM); +		return ERR_CAST(l_ctx);  	} +	req->wb_lock_context = l_ctx;  	/* Initialize the request struct. Initially, we assume a  	 * long write-back delay. This will be adjusted in @@ -290,7 +292,9 @@ static bool nfs_can_coalesce_requests(struct nfs_page *prev,  {  	if (req->wb_context->cred != prev->wb_context->cred)  		return false; -	if (req->wb_lock_context->lockowner != prev->wb_lock_context->lockowner) +	if (req->wb_lock_context->lockowner.l_owner != prev->wb_lock_context->lockowner.l_owner) +		return false; +	if (req->wb_lock_context->lockowner.l_pid != prev->wb_lock_context->lockowner.l_pid)  		return false;  	if (req->wb_context->state != prev->wb_context->state)  		return false;  |