NFS: check for req==NULL in nfs_try_to_update_request cleanup
authorFred Isaman <iisaman@netapp.com>
Thu, 5 Apr 2012 19:26:36 +0000 (15:26 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 18 Apr 2012 15:05:49 +0000 (11:05 -0400)
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/write.c

index 2c68818f68ac056b8587c22bf40f8f5d229a6403..9b8d4d42a8af4b78293b61449a508098432a4b40 100644 (file)
@@ -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);