浏览代码

NFS: check for req==NULL in nfs_try_to_update_request cleanup

Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Fred Isaman 13 年之前
父节点
当前提交
ca138f368a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fs/nfs/write.c

+ 2 - 1
fs/nfs/write.c

@@ -682,7 +682,8 @@ static struct nfs_page *nfs_try_to_update_request(struct inode *inode,
 		req->wb_bytes = rqend - req->wb_offset;
 out_unlock:
 	spin_unlock(&inode->i_lock);
-	nfs_clear_request_commit(req);
+	if (req)
+		nfs_clear_request_commit(req);
 	return req;
 out_flushme:
 	spin_unlock(&inode->i_lock);