summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index ea83f3c03c65..c2ce2db771b7 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1090,6 +1090,7 @@ bool pnfs_roc(struct inode *ino)
1090 pnfs_get_layout_hdr(lo); /* matched in pnfs_roc_release */ 1090 pnfs_get_layout_hdr(lo); /* matched in pnfs_roc_release */
1091 spin_unlock(&ino->i_lock); 1091 spin_unlock(&ino->i_lock);
1092 pnfs_free_lseg_list(&tmp_list); 1092 pnfs_free_lseg_list(&tmp_list);
1093 pnfs_layoutcommit_inode(ino, true);
1093 return true; 1094 return true;
1094 1095
1095out_noroc: 1096out_noroc:
@@ -1104,8 +1105,10 @@ out_noroc:
1104 } 1105 }
1105 } 1106 }
1106 spin_unlock(&ino->i_lock); 1107 spin_unlock(&ino->i_lock);
1107 if (layoutreturn) 1108 if (layoutreturn) {
1109 pnfs_layoutcommit_inode(ino, true);
1108 pnfs_send_layoutreturn(lo, stateid, IOMODE_ANY, true); 1110 pnfs_send_layoutreturn(lo, stateid, IOMODE_ANY, true);
1111 }
1109 return false; 1112 return false;
1110} 1113}
1111 1114