]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pnfs: Don't BUG on info received from Server
authorBoaz Harrosh <bharrosh@panasas.com>
Wed, 1 Aug 2012 14:30:13 +0000 (17:30 +0300)
committerBoaz Harrosh <bharrosh@panasas.com>
Thu, 2 Aug 2012 13:45:35 +0000 (16:45 +0300)
In nfs4_layoutreturn_done() there is a BUG_ON on a Server
returned member, when received in what the client thinks is
an impossible situation.

[The server returned ! lrp->res.lrs_present, but client
 still had more segments]

This BUG really hit me with the Linux pnfs Server, but
regardless of who is at fault here, Server or client, client
must not crash, even on a buggy Server.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
fs/nfs/nfs4proc.c

index 15fc7e4664ed53206074df177efd74e30dd13521..e25b686e760dce86c57416e26e20b783f625b0bf 100644 (file)
@@ -6249,7 +6249,7 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
                if (lrp->res.lrs_present) {
                        pnfs_set_layout_stateid(lo, &lrp->res.stateid, true);
                } else
-                       BUG_ON(!list_empty(&lo->plh_segs));
+                       WARN_ON(!list_empty(&lo->plh_segs));
        }
        lo->plh_block_lgets--;
        spin_unlock(&lo->plh_inode->i_lock);