Skip to content

Commit

Permalink
NFS: fix handling of malloc failure during nfs_flush_multi()
Browse files Browse the repository at this point in the history
Cleanup of the allocated list entries should not call
put_nfs_open_context() on each entry, as the context will
always be NULL, causing an oops.

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 Jan 19, 2011
1 parent c56eb8f commit 0da2a4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, unsigned
while (!list_empty(&list)) {
data = list_entry(list.next, struct nfs_write_data, pages);
list_del(&data->pages);
nfs_writedata_release(data);
nfs_writedata_free(data);
}
nfs_redirty_request(req);
return -ENOMEM;
Expand Down

0 comments on commit 0da2a4a

Please sign in to comment.