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://git.stricted.de/?a=commitdiff_plain;h=ca138f368a36dba40d3ef4a53d64af2011cda3c7;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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 2c68818f68ac..9b8d4d42a8af 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);