Skip to content

Commit

Permalink
NFS: check for req==NULL in nfs_try_to_update_request cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Fred Isaman authored and Trond Myklebust committed Apr 18, 2012
1 parent adae0fe commit ca138f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ca138f3

Please sign in to comment.