summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-12-28 14:49:41 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-28 14:49:41 -0500
commit58baac0ac7cc13a690f6f7cea23accaf84e843a0 (patch)
treef73c2f68d4a43ad95b75de646ad7e39c90d42c64 /fs/nfs/inode.c
parent8d0ed0ca6381fea4a97f3b0f085cb1dfa0a50ec0 (diff)
parent4d0ac22109740c36174c5aac630876b2af0f6943 (diff)
downloadlinux-58baac0ac7cc13a690f6f7cea23accaf84e843a0.tar.bz2
Merge branch 'flexfiles'
* flexfiles: pNFS/flexfiles: Ensure we record layoutstats even if RPC is terminated early pNFS: Add flag to track if we've called nfs4_ff_layout_stat_io_start_read/write pNFS/flexfiles: Fix a statistics gathering imbalance pNFS/flexfiles: Don't mark the entire layout as failed, when returning it pNFS/flexfiles: Don't prevent flexfiles client from retrying LAYOUTGET pnfs/flexfiles: count io stat in rpc_count_stats callback pnfs/flexfiles: do not mark delay-like status as DS failure NFS41: map NFS4ERR_LAYOUTUNAVAILABLE to ENODATA nfs: only remove page from mapping if launder_page fails nfs: handle request add failure properly nfs: centralize pgio error cleanup nfs: clean up rest of reqs when failing to add one NFS41: pop some layoutget errors to application pNFS/flexfiles: Support server-supplied layoutstats sampling period
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index c7e8b87da5b2..74fb1223c2f5 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -912,6 +912,12 @@ void nfs_file_clear_open_context(struct file *filp)
if (ctx) {
struct inode *inode = d_inode(ctx->dentry);
+ /*
+ * We fatal error on write before. Try to writeback
+ * every page again.
+ */
+ if (ctx->error < 0)
+ invalidate_inode_pages2(inode->i_mapping);
filp->private_data = NULL;
spin_lock(&inode->i_lock);
list_move_tail(&ctx->list, &NFS_I(inode)->open_files);