From: Fred Isaman Date: Thu, 5 Apr 2012 19:26:36 +0000 (-0400) Subject: NFS: check for req==NULL in nfs_try_to_update_request cleanup X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ca138f368a36dba40d3ef4a53d64af2011cda3c7;p=~shefty%2Frdma-dev.git NFS: check for req==NULL in nfs_try_to_update_request cleanup Signed-off-by: Fred Isaman Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 2c68818f68a..9b8d4d42a8a 100644 --- a/fs/nfs/write.c +++ b/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);