提交 731c74dd 编写于 作者: T Trond Myklebust

NFSv4: Report the error from nfs4_select_rw_stateid()

In pnfs_update_layout() ensure that we do report any fatal errors from
nfs4_select_rw_stateid().

Fixes: d9aba2b4 ("NFSv4: Don't use the zero stateid with layoutget")
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 c34fae00
......@@ -1903,12 +1903,6 @@ pnfs_update_layout(struct inode *ino,
goto out_unlock;
}
if (!nfs4_valid_open_stateid(ctx->state)) {
trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
PNFS_UPDATE_LAYOUT_INVALID_OPEN);
goto out_unlock;
}
/*
* Choose a stateid for the LAYOUTGET. If we don't have a layout
* stateid, or it has been invalidated, then we must use the open
......@@ -1939,6 +1933,7 @@ pnfs_update_layout(struct inode *ino,
iomode == IOMODE_RW ? FMODE_WRITE : FMODE_READ,
NULL, &stateid, NULL);
if (status != 0) {
lseg = ERR_PTR(status);
trace_pnfs_update_layout(ino, pos, count,
iomode, lo, lseg,
PNFS_UPDATE_LAYOUT_INVALID_OPEN);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册