pnfs: Don't call commit on failed layoutget-on-open
If the layoutget on open call failed, we can't really commit the inode, so don't bother calling it. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
64294b08f9
commit
32f1c28f3d
|
@ -2148,10 +2148,7 @@ void pnfs_parse_lgopen(struct inode *ino, struct nfs4_layoutget *lgp,
|
||||||
lgp->callback_count))
|
lgp->callback_count))
|
||||||
return;
|
return;
|
||||||
lseg = pnfs_layout_process(lgp);
|
lseg = pnfs_layout_process(lgp);
|
||||||
if (IS_ERR(lseg)) {
|
if (!IS_ERR(lseg)) {
|
||||||
/* ignore lseg, but would like to mark not to try lgopen */
|
|
||||||
/* clear some lo flags - first and fail ???? */
|
|
||||||
} else {
|
|
||||||
iomode = lgp->args.range.iomode;
|
iomode = lgp->args.range.iomode;
|
||||||
pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode));
|
pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode));
|
||||||
pnfs_put_lseg(lseg);
|
pnfs_put_lseg(lseg);
|
||||||
|
@ -2236,8 +2233,6 @@ out_forget:
|
||||||
spin_unlock(&ino->i_lock);
|
spin_unlock(&ino->i_lock);
|
||||||
lseg->pls_layout = lo;
|
lseg->pls_layout = lo;
|
||||||
NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg);
|
NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg);
|
||||||
if (!pnfs_layout_is_valid(lo))
|
|
||||||
nfs_commit_inode(ino, 0);
|
|
||||||
return ERR_PTR(-EAGAIN);
|
return ERR_PTR(-EAGAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue