summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-05-22 11:15:32 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-05-31 15:03:12 -0400
commit32f1c28f3d453f4652948ab9298078874d1a56b6 (patch)
treeeb37f956a37602c83d5d525ffcab21a229cb7ad1 /fs/nfs
parent64294b08f9d27f83cbb0975250614864fa733bda (diff)
downloadlinux-32f1c28f3d453f4652948ab9298078874d1a56b6.tar.gz
linux-32f1c28f3d453f4652948ab9298078874d1a56b6.tar.bz2
linux-32f1c28f3d453f4652948ab9298078874d1a56b6.zip
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pnfs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 717cd95a0306..d93942fa3817 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2148,10 +2148,7 @@ void pnfs_parse_lgopen(struct inode *ino, struct nfs4_layoutget *lgp,
lgp->callback_count))
return;
lseg = pnfs_layout_process(lgp);
- if (IS_ERR(lseg)) {
- /* ignore lseg, but would like to mark not to try lgopen */
- /* clear some lo flags - first and fail ???? */
- } else {
+ if (!IS_ERR(lseg)) {
iomode = lgp->args.range.iomode;
pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode));
pnfs_put_lseg(lseg);
@@ -2236,8 +2233,6 @@ out_forget:
spin_unlock(&ino->i_lock);
lseg->pls_layout = lo;
NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg);
- if (!pnfs_layout_is_valid(lo))
- nfs_commit_inode(ino, 0);
return ERR_PTR(-EAGAIN);
}