提交 dd1beb3d 编写于 作者: T Trond Myklebust 提交者: Anna Schumaker

NFS/pnfs: handle bad delegation stateids in nfs4_layoutget_handle_exception

We must call nfs4_handle_exception() on BAD_STATEID errors. The only
exception is if the stateid argument turns out to be a layout stateid
that is declared invalid.
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
Reviewed-by: NJeff Layton <jlayton@poochiereds.net>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
上级 e5241e43
......@@ -7924,8 +7924,8 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
break;
}
lo = NFS_I(inode)->layout;
if (lo && nfs4_stateid_match(&lgp->args.stateid,
&lo->plh_stateid)) {
if (lo && !test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags) &&
nfs4_stateid_match_other(&lgp->args.stateid, &lo->plh_stateid)) {
LIST_HEAD(head);
/*
......@@ -7936,10 +7936,10 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
pnfs_mark_matching_lsegs_invalid(lo, &head, NULL, 0);
spin_unlock(&inode->i_lock);
pnfs_free_lseg_list(&head);
status = -EAGAIN;
goto out;
} else
spin_unlock(&inode->i_lock);
status = -EAGAIN;
goto out;
}
status = nfs4_handle_exception(server, status, exception);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册