]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/nfs/blocklayout/blocklayout.c
pnfsblock: fix NULL pointer dereference
[karo-tx-linux.git] / fs / nfs / blocklayout / blocklayout.c
index 2167ba2afdbb85570aa4ccb4a900104a0363d8d5..4ddbfbf1c3ad62c081cd7b45f8ef2d9c00bbe344 100644 (file)
@@ -292,6 +292,7 @@ bl_read_pagelist(struct nfs_read_data *rdata)
                                                 bl_end_io_read, par);
                        if (IS_ERR(bio)) {
                                rdata->pnfs_error = PTR_ERR(bio);
+                               bio = NULL;
                                goto out;
                        }
                }
@@ -581,6 +582,7 @@ fill_invalid_ext:
                                                 bl_end_io_write_zero, par);
                        if (IS_ERR(bio)) {
                                wdata->pnfs_error = PTR_ERR(bio);
+                               bio = NULL;
                                goto out;
                        }
                        /* FIXME: This should be done in bi_end_io */
@@ -629,6 +631,7 @@ next_page:
                                         bl_end_io_write, par);
                if (IS_ERR(bio)) {
                        wdata->pnfs_error = PTR_ERR(bio);
+                       bio = NULL;
                        goto out;
                }
                isect += PAGE_CACHE_SECTORS;