NFSv4.1 fix null state reference in filelayout_async_handle_error
authorAndy Adamson <andros@netapp.com>
Tue, 22 May 2012 12:09:28 +0000 (08:09 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 22 May 2012 20:42:28 +0000 (16:42 -0400)
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4filelayout.c

index 33849d3bc885976840abd484dc1e27eadbc21ca6..f8edb14c697ea723985e365c4d52206950ade6d0 100644 (file)
@@ -199,8 +199,8 @@ static int filelayout_async_handle_error(struct rpc_task *task,
                 * layout is destroyed and a new valid layout is obtained.
                 */
                set_bit(NFS_LAYOUT_INVALID,
-                               &NFS_I(state->inode)->layout->plh_flags);
-               pnfs_destroy_layout(NFS_I(state->inode));
+                               &NFS_I(inode)->layout->plh_flags);
+               pnfs_destroy_layout(NFS_I(inode));
                rpc_wake_up(&tbl->slot_tbl_waitq);
                goto reset;
        /* RPC connection errors */
@@ -214,7 +214,7 @@ static int filelayout_async_handle_error(struct rpc_task *task,
                dprintk("%s DS connection error %d\n", __func__,
                        task->tk_status);
                if (!filelayout_test_devid_invalid(devid))
-                       _pnfs_return_layout(state->inode);
+                       _pnfs_return_layout(inode);
                filelayout_mark_devid_invalid(devid);
                rpc_wake_up(&tbl->slot_tbl_waitq);
                nfs4_ds_disconnect(clp);